3 Candle Strategy
Forums › ProRealTime English forum › ProOrder support › 3 Candle Strategy
- This topic has 82 replies, 6 voices, and was last updated 4 years ago by Regan2020.
-
-
08/08/2018 at 9:53 PM #77813
Well by your rule of thumb Vonasi it more or less passes!
More or less it passes – but then more rather than less you need enough start capital to fund it and then as it is on a 5 minute chart your back test data is so very limited that you have to take the results as potentially being an over optimised pile of poop! So multiply draw down by 100!
08/08/2018 at 10:09 PM #77814Here you go @Marc 🙂
12345678910111213141516171819202122232425262728293031//-------------------------------------------------------------------------// Main code : Marc 3Bars DJI 5M v1.0//-------------------------------------------------------------------------DEFPARAM CumulateOrders = falseTPL = (AverageTrueRange[28]((open+close+low+high)/4))*16SLL = (AverageTrueRange[14]((open+close+low+high)/4))*45TPS = (AverageTrueRange[26]((open+close+low+high)/4))*10SLS = (AverageTrueRange[2]((open+close+low+high)/4))*18//Buy-Conditionl1 = OPEN[2] > CLOSE[2] AND OPEN[1] > CLOSE[1] AND High[2] > High [1] AND High[1] > High AND Low[2] > Low[1] AND Low[1] > Low AND Close > Close[2]//Sell-Conditions1 = OPEN[2] < CLOSE[2] AND OPEN[1] < CLOSE[1] AND High[2] < High [1] AND High[1] < High AND Low[2] < Low[1] AND Low[1] < Low AND Close < Close[2]//Buy @ open of nextcandle if condition l1 is metIF l1 AND Not OnMarket THENBUY 2 SHARES AT MARKET //MarketOrderSET STOP LOSS SLLSET TARGET PROFIT TPLENDIF//Sell @ open of nextcandle if condition s1 is metIF s1 AND Not OnMarket THENSELLSHORT 2 SHARE AT MARKET //MarketOrderSET STOP LOSS SLSSET TARGET PROFIT TPSENDIF08/09/2018 at 9:29 AM #7783205/29/2020 at 9:59 AM #133746Hi all,
I am being met with the following message when trying to implement my back testing using the above code (a newbie to coding FYI) – ” Syntax Error in assignment”
I am sure that its probably something really simple, but any advice would be great,
many thanks
05/29/2020 at 10:08 AM #133752” Syntax Error in assignment”
I just copied the code above and pasted and backtested and I don’t get any syntax error.
Try copying and pasting the code again and let us know.
Attachments are with Spread = 4 and 3 min TF.
05/29/2020 at 12:44 PM #133773Thank you, I have re-run the code and its now working.
However, I noticed that you Back-tested it on DJI, so I followed suit, but my back test results were different to yours (please see attached screen shot)
Why set-up was a 3 minute timeframe with a 4 spread – but came back with far more results at a much higher loss?
05/29/2020 at 1:29 PM #133778You backtested on a $10 contract for 1,000 bars.
I backtested on a £1 contract for 10,000 bars.
Re far more trades …
I suspect you have below?
1DEFPARAM CumulateOrders = TrueI have below, same as the code I posted above …
1DEFPARAM CumulateOrders = false05/30/2020 at 2:28 PM #133884 -
AuthorPosts
Find exclusive trading pro-tools on