Code für Money Management

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13879 quote
    oiprcrtoiprcrt
    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
    WingWing
    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
    WingWing
    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
    oiprcrtoiprcrt
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 oiprcrtoiprcrt
10 years ago.

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