Forum

Where is Ticket 1?

Forgive me if this is a silly question, but whenever I backtest my EA in MT5 the tickets for trades always start from 2. Can someone explain why they do not start from 1

mql4 formula not working in mql5

I am trying to convert the DeMarker mql4 indicator into to mql5. https://www.mql5.com/en/code/8682 It is almost working, i am just having problems converting a formula which keeps resulting in inf (negative infinity) but works in mql4 Part of mql4 init() //---- variable reset e1= 0 ; e2= 0 ; e3= 0

Help Setting Trading Volume from Risk

I have seen many topics around this subject, but i am finding it difficult to understand. My trading algorithm sets my stop loss to 1.5 x the ATR of a symbol. My risk is 2% of my Free margin. (Is free margin the best place to take 2% of my balance?) //--- ATR calculations for Stop loss and Take

Help with converting William Roeder MT4 code to MT5

I am trying to calculate Lot Volume in mt5 based on risk% and stop loss based on ATR(14), also i need pip value for the current instrument. I am new to MT4/5 and C++, but i have managed to learn a lot and have managed to convert an MT4 Oscar indicator to work in MT5. 1. I have seen the code below

Help with CopyHigh

I need the High for PastBars BarPos is always correct giving me the position of the highest high during the last PastBars but the Highest Bar figure BarHigh2 is always wrong. Can some one explain why CopyHigh is not working for me please? int PastBars = 10; // Number of past bars to find highest