![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
yes i know but this is only for testing ea. i use it on M1 & M5. thank for informing.
Deviation*Point is 100 * Point in those timeframes most candels are not that big
Deviation*Point is 100 * Point in those timeframes most candels are not that big
i use it for margin in case the prices is still going up or going down.. as you can see when the Close[0] in my code is above valHigh they will convert it to valLow from that point if Close[0] is still going up and reach the margin buy signal will be true (this is only on my prediction), so that if the prices is still going up only buy signal is true & vice versa to the other side.
i use it for margin in case the prices is still going up or going down.. as you can see when the Close[0] in my code is above valHigh they will convert it to valLow from that point if Close[0] is still going up and reach the margin buy signal will be true (this is only on my prediction), so that if the prices is still going up only buy signal is true & vice versa to the other side.
Deviation*Point is 100 * Point in those timeframes most candels are not that big
thanks for your time guys i found solution to my problem..
int PrevBars;
int int() PrevBars=Bars;
int start()
{ if(Bars-Prevbars>0) i++;
.. then my code here...
PrevBars=Bars;
}
thanks for your time guys i found solution to my problem..
int PrevBars;
int int() PrevBars=Bars;
int start()
{ if(Bars-Prevbars>0) i++;
.. then my code here...
PrevBars=Bars;
}
Use SRC button for displaying code
Bars can reach its maximum so its not reliable
search for "once per bar" as WHRoeder suggested for other way once per bar
Please edit your posts and use SRC button as already asked !
Use SRC button for displaying code
Bars can reach its maximum so its not reliable
search for "once per bar" as WHRoeder suggested for other way once per bar
i found this code... i think this is more reliable..
i found this code... i think this is more reliable..
It is.... might be you still have to do i++; in your code
at position
It is.... might be you still have to do i++; in your code
at position
yes i still need to count the bars.. i want to put additional condition on the certain count.. but first i need to adjust my codes.. thanks guys for the advice.