Code für Money Management

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13879 quote
    oiprcrt
    Participant
    Junior

    Hallo Trader

    Wie programmiere ich dass z.B. nach 3 aufeinanderfolgenden Verlusttrades die Kontrakte um -1 reduziert werden? Aber nach z.B. 6 aufeinanderfolgenden Verlustrades um +1 Kontrakt erhöht wird?

    Grüsse Skubi

    #13881 quote
    Wing
    Participant
    Veteran
    once PositionSize = 7
    once NewTrade=0
    
    If NewTrade=1 and PositionPerf(1)<0 and PositionPerf(1)<0 and PositionPerf(3)<0 and PositionPerf(4)<0 and PositionPerf(5)<0 and PositionPerf(6)<0 then
    PositionSize= PositionSize+1 
    NewTrade=0
    elsif NewTrade=1 and PositionPerf(1)<0 and PositionPerf(1)<0 and PositionPerf(3)<0 then
    PositionSize = PositionSize-1
    NewTrade=0
    else
    
    endif
    
    // Buy/sellshort code
    If BuyConditions=1
    Buy Positionsize lot at market
    NewTrade=1
    endif
    
    
    
    
    
    
    
    oiprcrt thanked this post
    #13882 quote
    Wing
    Participant
    Veteran

    Oder:

     

    once StandardPosition= 7
    once PositionSize = StandardPosition
    once NewTrade=0
    once change=0
    
    If newtrade=0 and change=0 then
    positionsize=7
    elsif NewTrade=1 and PositionPerf(1)<0 and PositionPerf(2)<0 and PositionPerf(3)<0 and PositionPerf(4)<0 and PositionPerf(5)<0 and PositionPerf(6)<0 then
    PositionSize= PositionSize+1
    NewTrade=0
    change=1
    elsif NewTrade=1 and PositionPerf(1)<0 and PositionPerf(2)<0 and PositionPerf(3)<0 then
    PositionSize = PositionSize-1
    NewTrade=0
    change=1
    else
    
    endif
    
    If PositionSize=0 then
    Positionsize=1
    endif
    
    if positionperf(1)>0 then
    PositionSize=StandardPosition
    endif
    
    
    // Buy/sellshort code
    
    If BuyConditions then
    Buy PositionSize lot at market
    NewTrade=1
    change=0
    endif
    Nicolas thanked this post
    #13933 quote
    oiprcrt
    Participant
    Junior

    Vielen Dank Wing!

    Gruss Skubi

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Code für Money Management


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
oiprcrt @skubidu Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by oiprcrt
9 years, 4 months ago.

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 09/29/2016
Status: Active
Attachments: No files
Logo Logo
Loading...