How to recognize spikes
-
Hi. I want my system to close all trades and wait a few hours when there is a relatively big m5 spike on the chart, like when a major news are released. The sensitivity of that stopper should be adjustable, and the values must be universal, like an oscillator from 0 to 100 ( so it can be applied to any currency pair/stock).
Any suggestions?
edit: Just noticed that the impulse blocks are quite perfect for this. Have to say, I am just amazed of the diversity and user-friendliness of fxdreema

-
These blocks are just some ot my old ideas, but the way they are... they should be indicators, not functions in the EA. So I have plans to remove them and not trying to do the indicator's job in the EA again. Why not... first of all, it's not the optimal way, each of these blocks is surrounded with code that is trying to prevent the main code inside to work all the time. But I can't offer builder for indicators, so I'm leaving them for now

-
I think the CCI indicator is more suitable after all.. But how about stopping the ea until high volatility is over? If I set blocks like this: [CCI is over certain value] -> [close positions] -> [delay, seconds value 10800, thats 3 hours] , does the ea stop for 3 hours and then continue normally?
-
Well, this block is normally for small delays, I never tested it for long times to be honest. What it does is to pause the EA to the point where it is right now, and then continue from that point. In theory, it will work, so you can test it.
The alternative is, (again, in theory) but there is no special block for this, is to work with the time in some variables. If the variable is set to the time that is older than the current -> continue, otherwise don't do anything below. And set this variable to some time in the future where you want to set that delay. Eventually, the current time will reach that "future" time and the delay will expire. Then you can do that again.
Now that I'm explaining this, I think there are some blocks for that
For example "Once per minutes" or some other "Once...". But before using one of these, read it's description. Even I forget how they are working sometimes 