Posted By: tickserver
price() need to be called at least once()? - 10/22/23 22:58
I use a binary options strategy with 1h-candels and TimeFrame=2.
Because of broker restrictions I want to exclude trades [18:00-22:00[
The following code snippets do the exclusion correctly.
With the code block 1) in my strategy I get different results in backtesting than with 2)
1)
2) (quite different results:)
Why?
Because of broker restrictions I want to exclude trades [18:00-22:00[
The following code snippets do the exclusion correctly.
With the code block 1) in my strategy I get different results in backtesting than with 2)
1)
Code
vars Price = series(price()); int h = hour(0); if (h>18 && h<22) return;
2) (quite different results:)
Code
int h = hour(0); if (h>18 && h<22) return; vars Price = series(price());
Why?