View Single Post
  #6 (permalink)  
Old 02-28-2008, 02:00 PM
fxbs fxbs is offline
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 1,802
fxbs is on a distinguished road
yepp, thank you, Michel!
so overall shift formula will be:
PHP Code:
  string objname    ShortName
   
int    window     WindowFind(ShortName); 
   
int    labelShift = -5;   // or  it goes to: extern int labelShift = -5; 

 
if(ObjectFind(objname)<0
  
ObjectCreate(objname,OBJ_TEXT,window,customTime(labelShift),MacdBuffer[0]/2); 
  else  
ObjectMove(objname,0     ,customTime(labelShift),MacdBuffer[0]/2); 

    if(
pips!=0
       
ObjectSetText(objname,DoubleToStr(pips,0),FontSize,"Courier",FontColor); 
  else 
ObjectSetText(objname," "    ,FontSize,"Courier",FontColor); 


//---- done 
   
return(0); 

//+------------------------------------------------------------------+ 

int customTime(int a

   if(
a<0
         return(
Time[0]-Period()*60*a); 
   else  return(
Time[a]);    

Attached Files
File Type: mq4 MACD_Colored_v102M2.mq4 (6.0 KB, 4 views)

Last edited by fxbs; 02-28-2008 at 02:05 PM.
Reply With Quote