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!
Here you go @Marc 🙂
//-------------------------------------------------------------------------
// Main code : Marc 3Bars DJI 5M v1.0
//-------------------------------------------------------------------------
DEFPARAM CumulateOrders = false
TPL = (AverageTrueRange[28]((open+close+low+high)/4))*16
SLL = (AverageTrueRange[14]((open+close+low+high)/4))*45
TPS = (AverageTrueRange[26]((open+close+low+high)/4))*10
SLS = (AverageTrueRange[2]((open+close+low+high)/4))*18
//Buy-Condition
l1 = 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-Condition
s1 = 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 met
IF l1 AND Not OnMarket THEN
BUY 2 SHARES AT MARKET //MarketOrder
SET STOP LOSS SLL
SET TARGET PROFIT TPL
ENDIF
//Sell @ open of nextcandle if condition s1 is met
IF s1 AND Not OnMarket THEN
SELLSHORT 2 SHARE AT MARKET //MarketOrder
SET STOP LOSS SLS
SET TARGET PROFIT TPS
ENDIF
MarcParticipant
Average
thank you 🙂 for DJ this looks awesome in my opinion 😉
Hi 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
” 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.
Thank 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?
You 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?
DEFPARAM CumulateOrders = True
I have below, same as the code I posted above …
DEFPARAM CumulateOrders = false
Many thanks, seems to be working now.