No Backtesting results
- This topic has 6 replies, 3 voices, and was last updated 1 year ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
Similar topics:
Forums › ProRealTime English forum › ProOrder support › No Backtesting results
I have been using back testing for quite a while, I’ve just changed a strategy and now I get no results even when I change the code to be very simple. not sure what’s wrong here . AUD/USD mini
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
// Definition of code parameters DEFPARAM CumulateOrders = False // Cumulating positions deactivated // Buy Price Startprice = Tradeprice TakeProfit = (Startprice + 0.0008) Buyit = 1 // Conditions to enter long positions indicator1 = MACDline[12,26,9](close) indicator3 = MACD[12,26,9](close) indicator4 = Average[18](close) indicator5 = MACDSignal[12,26,9](close) c1 = (indicator1 > indicator1[1]) c2 = (indicator1 > indicator3) c3 = (close > indicator4) c7 = (indicator1 > indicator5) IF c1 and c2 THEN BUY 1 CONTRACT AT MARKET ENDIF // Conditions to exit long positions indicator6 = (close > Takeprofit) c4 = (indicator1 < indicator1[1]) c5 = (close > Startprice) c6 = indicator6 IF c4 or c6 THEN SELL AT MARKET ENDIF |
Thanks GraHal this has worked as well as a variable in the past but I’ll give it a try. but this is more about taking the trade not closing the position .. I’m struggling to even start a trade .. thank you ..
Typo in above, should as below …
1 2 |
MyBuy = C1 AND C2 GRAPH MyBuy |
Hi @crankbuddy
There is an error in the code, namely line 29 “c6=indicator6″…
This condition is always true, so the position is immediately closed again…
Remove line 29 and change line 31 to “If c4 then”
Find exclusive trading pro-tools on