help to change bart of code

Back to topics list To post a new topic, please log in or register
avatar
87
FxTrader_ 2015.09.20 12: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



avatar
87
FxTrader_ 2015.09.20 13: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

avatar
12985
WHRoeder 2015.09.20 17: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.
Back to topics list  

To add comments, please log in or register