Timezone problem..I think!
Forums › ProRealTime English forum › ProScreener support › Timezone problem..I think!
- This topic has 8 replies, 3 voices, and was last updated 3 years ago by bullbear.
-
-
03/31/2021 at 5:44 PM #165875
Hello
I changed the time zone from UTC +2 to UTC +1 for a few days.
Now when I change back to UTC +2 I do not get the same result when I do backtest.
Maybe it’s I changed another setting without knowing what is affecting the backtest result?
Tick by Tick is selected.
Is it possible to start PRT with basic settings to find my way back?
03/31/2021 at 6:41 PM #165880Because from the previous backtests with UTC+2 and now, several bars may have elapsed, so 10K bars on a 1-minute TF could be completely different after a few days!
03/31/2021 at 6:53 PM #16588203/31/2021 at 6:57 PM #165884I have never seen a RESET-TO-DEFAULT option/button
Sorry not to be able to help you further.
03/31/2021 at 7:38 PM #165888Hera is a backtest
The code from the forum.
This is how it looks on my computer.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586// Festlegen der Code-ParameterDEFPARAM CumulateOrders = true // Kumulieren von Positionen deaktiviertDEFPARAM Preloadbars = 300//timeframe(15 minute, updateonclose)gridStep = 20 //20MAXSHARES = abs(COUNTOFPOSITION) <= 1 //1// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen vor einer bestimmten UhrzeitnoEntryBeforeTime = 010000timeEnterBefore = time >= noEntryBeforeTime// Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen nach einer bestimmten UhrzeitnoEntryAfterTime = 233000timeEnterAfter = time < noEntryAfterTime// Verhindert das Trading an bestimmten WochentagendaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0// Longindicator1 = Average[25](close)//25indicator2 = Average[180](close)//180c1 = (indicator1 CROSSES UNDER indicator2)indicator3 = ADX[14]c2 = (indicator3 > 10)indicator4 = ADX[14]c3 = (indicator4 < 30) //30IF not longonmarket and (c1 AND c2 AND c3) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THENBUY 1 CONTRACT AT MARKETENDIF//gridif longonmarket and tradeprice-close>=gridStep*pointsize and maxshares thenbuy 2 contract at marketendif// Longexitindicator5 = Average[25](close)//25indicator6 = Average[180](close)//180c4 = (indicator5 CROSSES OVER indicator6)IF c4 THENSELL AT MARKETENDIF// Stops und TargetsSET STOP pLOSS 75 //75//timeframe(default) //5 minute//************************************************************************//trailing stop functiontrailingstart = 8 //8 trailing will start @trailinstart points profittrailingstep = 1 //1 trailing step to move the "stoploss"//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-positionprice>=trailingstart*pipsize THENnewSL = positionprice+trailingstep*pipsizeENDIF//next movesIF newSL>0 AND close-newSL>=trailingstep*pipsize THENnewSL = newSL+trailingstep*pipsizeENDIFENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND positionprice-close>=trailingstart*pipsize THENnewSL = positionprice-trailingstep*pipsizeENDIF//next movesIF newSL>0 AND newSL-close>=trailingstep*pipsize THENnewSL = newSL-trailingstep*pipsizeENDIFENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF04/02/2021 at 11:45 AM #166033I may have found the error now.
I get the same results on my back tests regardless of whether I use “Tick by Tick” or not.
Have tested with different codes and in different markets but there is no difference with or without “Tick by Tick”How do i solve this -)
Regards B
04/03/2021 at 12:19 PM #166095Tick-by-Tick dioesn’t affect your above code, as it has no TP.
When Tick-by-Tick mode detects that both TP & SL have been hit on the same bar, doesn’t assume TP was hit first (as it was before that addition, some years ago), but it scans the bar tick by tick to spot what was hit first.
In your case there’s no TP, so there’s no need to check.
04/05/2021 at 2:26 PM #16620104/05/2021 at 3:52 PM #166212Thank you for your answers.
Thought I had found the error.
But something is strange with my back test.
My back tests are incorrect.
If anyone wants, feel free to test the code above.
I suspect that you will get a completely different result with the same code.
I used Spread = 1
Tick by Tick = yes
-
AuthorPosts
Find exclusive trading pro-tools on