Machine learning in trading: theory, models, practice and algo-trading - page 506
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi all!!! Guys, tell me how to delay the calculation of the indicator. A new bar opened and the indicator needs to be calculated after 30 seconds!!!!!
I can't find it in the system, I don't know where it's written.
What is a delay for?
Why is there a delay?
The data from SME are loaded with a delay of 30 seconds. And sometimes the indicator is calculated and then the data is loaded, then I recompile the indicator and it changes the direction, because the data is loaded completely, in contrast to the first 5 seconds of the bar life. As a rule, 30 seconds is enough. Is it possible to do this with the indicator? I mean the delay.....
The data from SME are loaded with a delay of 30 seconds. And sometimes the indicator is calculated and then the data is loaded, then I recompile the indicator and it changes the direction, because the data is loaded completely, in contrast to the first 5 seconds of the bar life. As a rule, 30 seconds is enough. Is it possible to do this with the indicator? I mean the delay.....
Or you can do it yourself: the time of a new bar is memorized and every tick will check if 30 seconds have passed.
Either create a one-time timer event,
Or make it yourself: a new bar time is memorized and each tick is checked if 30 seconds have passed.
Exactly the timer function is not quite clear. According to the previous advice I made the following function and now the calculation of the bar is without delay. (without it it did not count at all until you switch the TF)
What's the best way to organize it, could you suggest????
The data from SME are loaded with a delay of 30 seconds. And sometimes the indicator is calculated and then the data is loaded, then I recompile the indicator and it changes the direction, because the data is loaded completely, in contrast to the first 5 seconds of the bar life. As a rule, 30 seconds is enough. Is it possible to do this with the indicator? I mean the delay.....
The first thing that came:
The first thing that came in:
Interesting!!! Inserted your code into the turkey, I'll see what's up. But I thought that such a delay should be described in onTimer, no?
Thanks anyway!!!Hi all!!! Guys, tell me how to delay the calculation of the indicator. A new bar opened and the indicator needs to be calculated after 30 seconds!!!!!
Or tell me where it is written or an example, I searched all over, I can not find :-(
Why 30 seconds? - Do at once for 60 seconds - i.e. count not on the 1st bar, but on the 2nd. I.e. you have a new zero bar, you still have to wait 30 seconds for the first one, but the 2nd one is ready.
In addition to that you must optimize and test by opening prices.
https://poseidon01.ssrn.com/delivery.php?ID=763127112013070121004013100000004077025053037016086024125099096068102002124112071109045022005106001123061008011015117068024080016072058003054100019088103096082000086021038067117103095090023093007066096114109125098072118089023122101115099095080030066103&EXT=pdf
https://poseidon01.ssrn.com/delivery.php?ID=763127112013070121004013100000004077025053037016086024125099096068102002124112071109045022005106001123061008011015117068024080016072058003054100019088103096082000086021038067117103095090023093007066096114109125098072118089023122101115099095080030066103&EXT=pdf
I took a quick look. In the conclusions I saw information that is trivial for GARCH models. I don't understand what needs to be taken out of this material?
Why 30 seconds? - Do it immediately for 60 seconds - i.e. do not count by the 1st bar, but by the 2nd. I.e. came out a new 0-th bar, the first still have to wait 30 seconds, but the 2nd is ready.
And you probably also optimize and test by opening prices.
I do so with BO! But with the main strategy this will not work, it means the decision bar should be shifted back, which is contrary to the basic strategy, so not an option....