Forum

partial close order depending on order size using switch

Hi guys, I wonder if someone can help here. I want my EA to to close orders partial. i.e when the EA has placed an order with 1.6lots, if the EA is in profit, and i have achieved 0.8lots profit then it should close 0.8 lots. Below is my code. First part shows my partial close functions - I cant see

Count how many lost orders from the last profit order

Hi, I wonder if someone can help me. I need to calculate total lost orders from my order history, since the last profit order closed. I can count the orders but i am struggling with the equation of selecting it from the last profit order. Below is my script. Please can someone help out? int

Previous MA value and signal as a indicator text

Hi all, I am new to MQL4 coding. I need to write an indicator where it shows the value of previous MA 20 and 8. also if 20 is above 8 then it should be sell else if 8 is above 20 then it should be buy. cant understand how to write, My Indicators keeps coming up with problems. I am hoping for a

Detect which number candle is the highest

Hi All, I am new to MQL world and need some assistance. I need to find out which if price in the last 10 candles has touched my 20 Moving average . I am not sure what is the best way to write this and how to do it. Can you please help? Thanks