Forum

A simple way to calculate Max Potential profit and growth of a forex symbol

Its a MT5 Script if any one could turn it into an EA it would be very much appreciated. void OnStart () { int Num_bars; switch ( _Period ) { case PERIOD_M1 :Num_bars = 180 ; break ; case PERIOD_M3 :Num_bars = 60 ; break ; case PERIOD_M5 :Num_bars = 36 ; break ;

Coding HELP!! Please

Why does this not work? int Y; if ( PERIOD_CURRENT == PERIOD_M3 ) { Y = 2380 ; Print (Y); } else if ( PERIOD_CURRENT == PERIOD_M5 ) { Y= 1428 ; Print (Y); } else if ( PERIOD_CURRENT == PERIOD_M10 ) { Y=

Help with MT5 Code

Some One help me fix this CODE the problems i face are: 1-suppose the atr value is 0.00589, i want it to be 589. 2-the correct atr value of the current bar never gets returned. There is a huge problem with iATR or I simple can not use it properly so please teach me #property