Download MetaTrader 5
To add comments, please log in or register
Track all payments in your profile. It is easy!
fxtrader_
247
fxtrader_ 2015.09.20 10:45 

Hi all,


Any one can please help to change this bart of code,


//-------------------------------

   if ( Close[0] > Open[0] )           ObjectSetText( "lblChgBg", "ggg", 600, "Webdings", Blue );
   else if ( Close[0] < Open[0] )    ObjectSetText( "lblChgBg", "ggg", 600, "Webdings", Red );
   else                                        ObjectSetText( "lblChgBg", "ggg", 600, "Webdings", Black );   

//------------------------------


I need it as the fallowing:

if ( Close[0] > iMA(C,26)

alse if (close[0] < iMA(C,26)


Thanks

fxtrader_
247
fxtrader_ 2015.09.20 11:30  

Sorry Here is the full code :


int start()
{     
   if ( ObjectFind( "lblChgBg" ) == -1 )   ObjectCreate( "lblChgBg", OBJ_LABEL, 0, 0, 0 );     
  
   ObjectSet( "lblChgBg", OBJPROP_XDISTANCE, 0 );
   ObjectSet( "lblChgBg", OBJPROP_YDISTANCE, 0 ); 
   ObjectSet( "lblChgBg", OBJPROP_CORNER, 0 );   
   ObjectSet( "lblChgBg", OBJPROP_BACK, true );   
  
   if ( Close[0] > Open[0] )        ObjectSetText( "lblChgBg", "ggg", 600, "Webdings", Blue );
   else if ( Close[0] < Open[0] )   ObjectSetText( "lblChgBg", "ggg", 600, "Webdings", Red );
   else                             ObjectSetText( "lblChgBg", "ggg", 600, "Webdings", Black );  
}



Thanks

whroeder1
13602
whroeder1 2015.09.20 15:06  
FxTrader_: I need it as the fallowing
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it.

  2. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
/
To add comments, please log in or register