No Backtesting results
Forums › ProRealTime English forum › ProOrder support › No Backtesting results
- This topic has 6 replies, 3 voices, and was last updated 12 months ago by crankbuddy.
-
-
11/24/2023 at 12:54 AM #224219
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
simple trade123456789101112131415161718192021222324252627282930313233// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Buy PriceStartprice = TradepriceTakeProfit = (Startprice + 0.0008)Buyit = 1// Conditions to enter long positionsindicator1 = 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 THENBUY 1 CONTRACT AT MARKETENDIF// Conditions to exit long positionsindicator6 = (close > Takeprofit)c4 = (indicator1 < indicator1[1])c5 = (close > Startprice)c6 = indicator6IF c4 or c6 THENSELL AT MARKETENDIF11/24/2023 at 8:49 AM #22422311/24/2023 at 9:13 AM #224224Thanks 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 ..
11/24/2023 at 9:27 AM #22422511/24/2023 at 10:29 AM #224231Typo in above, should as below …
12MyBuy = C1 AND C2GRAPH MyBuy1 user thanked author for this post.
11/24/2023 at 1:40 PM #224252Hi @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”
2 users thanked author for this post.
11/24/2023 at 11:53 PM #224275 -
AuthorPosts
Find exclusive trading pro-tools on