Forum

"for" loop doesn't update

Hi, I have an open order counter, which works, and I want to know the open price for the last opened order... so I made something like this string MyComB=CountOrdersBuy()+ 1 ; //this value is ok //Then, I use "MyComB" as the comment for next BUY order //Orders Counter BUY <-- This works ok int

OrderModify to change TP and SL

Hi, i'm using OrderModify to change TP and SL of floating orders but I need a simple idea to make this happen only once. Right now I had to put SL as 0 when I open the order, so when I change it and gets a value, then it stops... but i'd like to use another thing to make it dynamic (similar to

Find indicators last cross

Hi, i'm trying to get the value of the candle of the last MACD cross. I found this conversation that might work for me, but it seems it's for mt5 and I need it for mt4. https://www.mql5.com/en/forum/158877 I attach the code found so you don't need to look for it :) int find_XX_cross( int iBeg= 0 ){