Problem with “Trading the strategy profit curve”
Forums › ProRealTime English forum › ProOrder support › Problem with “Trading the strategy profit curve”
- This topic has 20 replies, 3 voices, and was last updated 4 years ago by
Link.
-
-
05/02/2021 at 5:29 PM #168600
I have no further solutions.
08/08/2021 at 10:32 AM #1749111234567891011121314151617181920212223242526272829303132333435363738394041//Condiciones de posicionCONDBUY = CondBuy1 and CondBuy2 and c1 and c2 and c3 and CtimeA and Tradeon and TradeON1 and TradeON2 and TradeON3 and Not OnmarketONCE equitycurve = 0curveperiod = 17280once mydays = 1once olddate = 0//indicatorsequitycurve = average[curveperiod](strategyprofit)ONCE TradeON3 = 1IF StrategyProfit CROSSES UNDER equitycurve THENTradeON3 = 0ENDIFIF StrategyProfit CROSSES OVER equitycurve THENTradeON3 = 1ENDIF//mydays variable incrementing to let the average curve build over timeif date > olddate thenmydays=mydays+1olddate = dateendifGRAPH equitycurve coloured(255,0,0) as "equity curve"GRAPH strategyprofit as "strategy profit"//Tamaño, Profit y Stop de la posicionIF CONDBUY and Strategyprofit <= 80000 AND mydays<curveperiod THENONCE Positionsize = 1buy positionsize contract at marketSET TARGET %PROFIT 2.1SET STOP %LOSS 1.6ENDIFIF CONDBUY and Strategyprofit <= 80000 AND strategyprofit>=equitycurve AND mydays>curveperiod THENONCE Positionsize = 1buy positionsize contract at marketSET TARGET %PROFIT 2.1SET STOP %LOSS 1.6ENDIF1234567<span class="Y2IQFc" lang="en">I have entered the code so that when strategyprofit crosses below equitycurve trades are paused.But what it does is stop operating.I need code so that when strategyprofit crosses again above equitycurve it will trade again.Thanks.</span>1108/08/2021 at 10:34 AM #17491508/08/2021 at 11:00 AM #174918I don’t know what translator you are using, but you are the only one who ALWAYS posts text this way. I often use translators, but this mess doesn’t happen. Please remove embedded HTML codes, before posting.
You’ve already been answered, Once you have paused a strategy because STRATEGYPROFIT crosses UNDER the equity curve, there’s no way to cross above again as no further trades are allowed.
You can only time the PAUSE, so that the PAUSE expitres after N bars or the next day, or when there is a new highest HIGH or lowest LOW, etc… THe equity curve will stay flat until you start trading again!08/08/2021 at 2:28 PM #17493008/20/2021 at 8:20 PM #175823 -
AuthorPosts
Find exclusive trading pro-tools on