Forum

Need help coding a simple strategy

Hi, I'm new to MQL I am working on an EA with a simple strategy trading on a certain price levels. My defined price levels are 00, 20, 50 and 80. So let's say in a EUR/USD pair if the last two to three bars closes at my trigger price level i.e. 1.30500 then I will execute a trade with a take profit

How to get the value in digits

Hi, I'm fairly new in MQL is there a way to get the exact value of the Digit variable let's say for EU 1.3050, is there a way to get 3050 or can I do it by splicing the variable? Thanks in advance

Help on getting 25% of bar range

Hello my trading logic requires to check if the close of the bar is equal to 25% of the bar's range. Can somebody check if I am doing it right? below is a snippet of my code // For long trade if (iClose( NULL , 0 , 0 ) >= ( 0.25 * ( iHigh( NULL , 0 , 0 ) - iLow( NULL , 0 , 0 ) ) + iLow( NULL , 0