Win / Loss Streak

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #8297 quote
    grizzly
    Participant
    Average

    Hi all,

    Just wanted to share a version snippet of my money management code from the strategy I posted here:

    USDJPY trading strategy – 1minTF – SAR and EMA

    The idea is to increase position sizes to a function of Live Equity balance. However, if win or loss streaks (>3) occur, significantly scale up or down position sizing.

    Any questions or suggestions welcome!

     

    //MONEY MGT//
    Ratio = 1.5
    Equity = (Strategyprofit+20000) //20,0000 Yen
    Risk = round(Ratio*Equity/100000) //100,000 Yen
    Losses = positionperf(1)<0 and positionperf(2)<0 and positionperf(3)<0
    streak = positionperf(1)>0 and positionperf(2)>0 and positionperf(3)>0
    if losses then
    n = max(abs(round(max(3+risk-2,risk-2))),2)
    elsif not losses then
    n = max(abs(round(max(3+risk,risk))),2)
    endif
    if streak then
    n = max(abs(round(max(5+risk,risk))),2)
    endif
    //
    
    
            
    1.jpg 1.jpg
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Win / Loss Streak


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
grizzly @grizzly09 Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/29/2016
Status: Active
Attachments: No files
Logo Logo
Loading...