Forum

problem with NormalizeDouble

Hi I have this code double result = NormalizeDouble (Current_Balance/ 20000 , _Digits ); When the balance is 200 $, the result is really 0.016 but the output is 0.02 !! I know that MT5 doesn't accept 0.016 as a certain volume so I'd like to set the "result" to 0.01 not 0.02. Please help me with

How to separete the letters of a word ?

Hi I have to separate the letters of a word , for example " USDJPY ", then change it to "U,S,D,J,P,Y". I mean using a Comma or Slash between it's letters. can you help me please

What's wrong with this code ?!!!

Hi I've written a very simple code to buy if a cross between MAs occurs. But the error is "Invalid order type ". All the parameters could be found like ask and Bstl but it could not open position. this is m_Trade #include <Trade\Trade.mqh> CTrade m_Trade; can u help me please. void

why OBJ_ARROW_DOWN is reversed ?!!

Hi every body I've wrote this code ObjectCreate ( 0 , "Close_Line" , OBJ_ARROW_DOWN , 0 ,Time_0,Close_0); But the result is : Please guide me how to make it's direction downward arrow

sending notification

Hi everyone I'm using crossover strategy and sendnotification() function . after crossing MAs , for 60 seconds(in every Tick in Bar[0]) it sends notification. How can I limit it to only once ? I used NewBar function but it doesn't work at all. Please help if you know

Help for SendNotification() problem

Hello everyone I designed an indicator , I put the same code for Alert and for sending notification , there is no error for Alert, but SendNotification() doen't work at all. I am not sure if this function works in indicator generally!? Can anyone help me ? Thanks if (SendNotify == true )

stoploss modification problem

Hi When I want to get PositionOpenPrice for stoploss modification using CTrade , I have to write while(PositionSelect(symbol) == false); before PositionGetDouble( POSITION_PRICE_OPEN ); otherwise EA can't get PositionOpenPriceand and so the Buy key on panel is only able to buy once not more

how to hide objects behind the Panel ?

Hi everyone I've created panel in mt5 , but as the attached picture shows , some objects are shown . I use MainWindow.BringToTop() but it doesn't work for hiding objects. Please help

Help with indicator in mql5

Hi every one I'm trying to convert a code from mql4 to mql5 , but the mql5 indicator doesn't show anything in mt5. Please help if you can

problem with EMPTY_VALUE

Hello everyone I'm using iCustom function to give the indicator's buffer, I added the code to prevent invalid data when indicator buffer is empty if ( Value != EMPTY_VALUE ){ Value = Lower[ 0 ]; Print (Lower_Value); } but when indicator has value , the toolbox prints the right value but even when