- Coding Bollinger-Bands
- How to use two Bollinger Bands in MQL4
- MQL4 or 5 Code on Bollinger Bands
Show your code (Using the code button or Alt+S) if you want help.
Do not double post!!
I have deleted your duplicate topic.
//Buy Paramaters if ( (PRICE_CLOSE > SlowMovingAverage) && RsiIndicator <= 30 && (PRICE_OPEN[1] > UpperBB && PRICE_CLOSE[1] < UpperBB) ) { int OrderResult = OrderSend(Symbol(), OP_BUY, LotsToTrade, Ask, 10, 0, 0, NULL, Magic, 0, clrAliceBlue); LastTradePlacedTimestamp = TimeCurrent(); } //Sell Paramaters else if ( (PRICE_CLOSE < SlowMovingAverage) && RsiIndicator >= 70 && (PRICE_OPEN[1] < LowerBB && PRICE_CLOSE[1] > LowerBB) ) { int OrderResult = OrderSend(Symbol(), OP_SELL, LotsToTrade, Bid, 10, 0, 0, NULL, Magic, 0, clrCrimson); LastTradePlacedTimestamp = TimeCurrent(); }
Show your code (Using the code button or Alt+S) if you want help.
Do not double post!!
I have deleted your duplicate topic.
PRICE_CLOSE is an enum that equates to 0 so I don't understand why you are using it.
You are also using PRICE_CLOSE[1], PRICE_OPEN[1], have you declared arrays named PRICE_CLOSE, PRICE_OPEN ?
You are using variables that are probably results from iCustom calls, but you don't show where the variables are assigned a value.
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
PRICE_CLOSE is an enum that equates to 0 so I don't understand why you are using it.
You are also using PRICE_CLOSE[1], PRICE_OPEN[1], have you declared arrays named PRICE_CLOSE, PRICE_OPEN ?
You are using variables that are probably results from iCustom calls, but you don't show where the variables are assigned a value.
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.
Thanks for moving it. I will put it in the right section next time. What could I use instead of PRICE_CLOSE to get the value of the last candle because this line of code is not in an array. Would you like me to show the whole code?
If you want the price of the last closed candle use Close[1] or Open[1].
If you want the price of the last closed candle use Close[1] or Open[1].
Thanks that really helped me out. This is my first time coding in mql4 still trying to maneuver the reference
If you want the price of the last closed candle use Close[1] or Open[1].
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use