[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 490
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
I usually make a variable LastBarAlert and write Time[0] to it when the alert is triggered.
And then elementary, the alert is output if LastBarAlert!=Time[0]
Thank you. It really works. But why does the indicator save the value of LastBarAlert variable, but not the value of any other variable. I did it this way. It's essentially the same, but for some reason it doesn't work.
Thank you. It really works. But why does the indicator save the value of LastBarAlert variable, but not the value of any other variable. I did it this way. It seems to work the same way, but for some reason it doesn't.
Where in your code is the initialization of the variable AllowAlert with value true?
If before checking for signal and state of this variable in the line...
... ...then further resetting this flag to false won't do anything. After all, it will be initialized with true again before this check...
Thank you. It really works. But why does the indicator save the value of LastBarAlert variable, but not the value of any other variable. I did it this way. It's essentially the same, but for some reason it doesn't work.
Спасибо. Это действительно работает. Но почему индикатор сохраняет значение переменной LastBarAlert, а значение какой нибудь другой переменной не сохраняет. Я делал так. По сути получается точно так же, но почему то не работает.
You have AllowAlert set to true right at the moment of checking. It should be like this (double =):
Or better like this :
You have AllowAlert set to true right at the moment of checking. It should be like this (double =):
Or better like this :
Ideally the signal should be once on the current bar, but it was triggered on every tick.Basically, the variable was declared static, and was reset after a few bars. The condition was as follows.
Why don't you take a preliminary look here :https://www.mql5.com/ru/forum/131853?
I'm more interested not in how to do it, but why my code doesn't work. More precisely, why it works in the EA, but not in the indicator.
Most likely, and this was suggested to me here (for lack of your code)
You have several alerts, and you apply the same stat variable to all of them
Hello.
can anyone tell me?
how do i make a range of an EA work?
draw a line, rename it "buy_down".
draw the second line, rename it "buy_up"
and let the EA trade only between these lines.
I can't see any difference between them.
Hello.
can anyone tell me?
how do i make a range of an EA work?
draw a line, rename it "buy_down".
draw a second line, rename it "buy_up"
and let the EA trade only between these lines.
I can't see any difference between them.
Go here: https: //www.mql5.com/ru/job