Forum

MetaTrader's 16thJan's2023 Update changed some MQL4 multitimeframe functionality?

For years, I was reading out BB into a double and worked perfectly fine using a hard coded timeframe (i.e Not using Period() as an argument), this gave me the chance to change timeframes without changing my strategy: period: 5 ; double UpperBand = iBands ( Symbol (), period, 20 , 2 , 0 , PRICE_CLOSE

EA recovery (reupdate after removal) not working, maybe I should try Gloval Variables?

Hello, I've been struggling with this for a quite a while, and I get some error that just don't make sense to me, Hopefully some of you pros can help me out and find what I'm missing. I want to assign the ticket number to each open order after removal and then also get the open price of the oldest

My Bid price is not updating in my code

Hello, I want to open a new trade when price has passed a threshold, when I did this with a for loop and with OrderSelect(i, SELECT_BY_POS) it worked fine, but now I'm directly selecting one order, and when I print both the bid price, and the order opening price, they have the same value. For some

[Help] Weird exponential values (even negative) when I print my data of price and rsi

Hello, I want to fill these arrays with high and low values of rsi and price. When I use a position of 5 it prints fine (see the first 4 rows of the photo, these are pricehighs, pricelows, rsihighs and rsilows). The moment I use a bigger position to search throught the data 10, 15,... I get weierd

Ctrade not executing sells, only buys.

Hello, I found it weird that if I test Ctrade with trade.buy it executes correctly, but when I try to sell with trade.Sell, it doesn't open the position as it does with buy, and I get no errors, I do get "Sell executed" printed, so I don't know where the problem lies. (I just tried it on a demo

Get price in array set like with this RSI example

Hello, I have been trying to get the price in an array like I have managed to do with the RSI. I can only seem to get the current price, but I would like to call it with price[i]. Is this possible? //+------------------------------------------------------------------------------+ //|

Getting closing price in an array

Hello, I want to have the closing prices in an array which I can call using name_array[x] whereas x is the price on that timeframe (1m, 1h, etc). What can I use for this? I only found information on CopySpread, copy tick and realtime updates. (Copy spread keepts telling me an error that this