In future please post in the correct section
I will move your topic to the MQL4 and Metatrader 4 section.
if (Open[1] && Close[1] < LowerBB)
This is wrong, you can use
if (Open[1] < LowerBB && Close[1] < LowerBB)
or
if (MathMax(Open[1] , Close[1]) < LowerBB)
ObjectCreate(NULL,"Buy",OBJ_ARROW_BUY,0,TimeCurrent(),Open[0]);
You can only create an object once, so if you want more arrows, they will all have to have different names.
Either that or you can use buffers.
![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
Hi there,
I'm stuck with this thing. The idea is to generate an arrow object at current candle OpenPrice, when previous candle Open & Close is completely outside the range of 2stdv.
The code works once, but wont work "every Tick".
Thank you!