Forums › ProRealTime English forum › ProOrder support › [beta-testing] multi timeframe support for automatic trading, ideas are welcome! › Reply To: [beta-testing] multi timeframe support for automatic trading, ideas are welcome!
10/07/2018 at 11:07 PM
#82206
Hallo,
Today I have been testing with Multiple Time Frames in the DEMO PRT environment, I used the FTSE 100 Cash 1 Euro, for testing, see the code below.
I found two weard things, seems errors to me:
- It ignore time restraints completely in MTF code: the limited time for opening a position // if TIME >= 73000 And TIME <= 93000 then // is ignored. Opening positions are taken during the whole day, this can be found at the tab //Close Position List// when running the code in backtesting.
- I receive complete different trade results varying the code at Time Frame of 15 minutes. I am using the 15 minutes graph, which is the lowest timeframe for my testing I would expect the code behind Time Frame, //update on close// and //default// used in the lowest timeframe to give exactly the same trading results. Why NOT is for me a question.
- timeframe(15 minutes,updateonclose) gives a much higher trade result as
- timeframe(15 minutes, default)
It seems to me like bugs in the new MTF module, it does not seem as realiable, any comment on this ?
PS: the PRT code used for those findings, is stated below
KR Jan
Testing code MTF
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 |
//SIMPLE LONG + SHORT STRATEGY FOR TESTING MULTIPLE TIME FRAME IN PRT TEST ENVIRONMENT 07.10.2018 DEFPARAM CumulateOrders = False // Cumulating positions deactivate DEFPARAM Preloadbars = 500 // (Definition) Averages in different timeframes timeframe(60 minutes,updateonclose) Av60 = average[18,1](close) timeframe(30 minutes,updateonclose) Av30 = average[18,1](close) timeframe(15 minutes,updateonclose) Av15 = average[26,1](close) if TIME >= 73000 And TIME <= 93000 then IF Av60 > Av60[1] and Av30 > Av30[1] and Av15 > Av15[1] and Av15[1] < Av15[2] THEN BUY 1 shares AT MARKET SET STOP PLOSS 60 SET STOP PTRAILING 30 endif else IF Av60 < Av60[1] and Av30 < Av30[1] and Av15 < Av15[1] and Av15[1] > Av15[2] THEN SELLSHORT 1 shares AT MARKET SET STOP PLOSS 60 SET STOP PTRAILING 30 endif endif |