Forum

Close Orders When Takeprofit

Hi, im developing a EA which closes orders when take profit another. I dont know why isn't working. Here is the code There is some wrong with my code? When run, if the market keeps growing up, mt4 closes the ord1 when reach the spread and keep ord2 opened, instead keep both opened. Considerations

Error when using RSI and string value

Hi, I'm developing a code(on MQL4) that when RSI is on vaue 72, he store on a string like "position 1". And i want to open a order when rsi has an different value but also string has position 1. For eg. IF RSI is 72, x = "position 1". if rsi is 69 and x = "position 1", open order. But not getting