Coding help - page 681

 
mladen:

stevenpun

Did you try doing it (this is the form of it :

bool  ObjectSetFiboDescription(
   string   object_name,   // object name
   int      index,         // level index
   string   text           // new description
   );

That way you can place it at exact place where you want it. Otherwise I would be guessing what is your intention

Not really understand , i try like this but not success

   string   name;   // object name
   int      index;         // level index
   string   text;           // new description
   bool isSwingDown = shiftHighest > shiftLowest;
   string objOuterId = indId + "outer";
   string objInnerId = indId + "inner";
   string objTopPrice = indId + "topPrice";
   string objBottomPrice = indId + "bottomPrice";
   string objRetRect = indId + "retracementRectangle";
   double retracementExtent;
   int shiftMostRetraced;
    
   if (isSwingDown == true)
   {     
      ObjectCreate(objOuterId, OBJ_FIBO, 0, Time[shiftHighest], High[shiftHighest], Time[shiftLowest], Low[shiftLowest]);   
      ObjectSet(objOuterId, OBJPROP_COLOR, ColorDowntrend);
      ObjectSet(objOuterId, OBJPROP_LEVELCOLOR, ColorDowntrend);
      ObjectSet(objOuterId, OBJPROP_LEVELSTYLE, STYLE_DOT);      
      ObjectSetFiboDescription(name,index, "(" + DoubleToStr(ObjectGet(name,      <<< new line add 
                             OBJPROP_FIRSTLEVEL+index)*100,1) + ")" + " - %$");

And can you help me to check the indicator i attach again , i not sure is that i doing somethings wrong or the SetIndexBuffer i have wrong arrange .

The candle cant show on chart  , only the channel .

Sorry for bother your weekend .

Files:
 
stevenpun:

Not really understand , i try like this but not success

And can you help me to check the indicator i attach again , i not sure is that i doing somethings wrong or the SetIndexBuffer i have wrong arrange .

The candle cant show on chart  , only the channel .

Sorry for bother your weekend .

stevenpun

You can use this code snippet as a guide

extern double Level1 = 0.236;
extern double Level2 = 0.382;
extern double Level3 = 0.500;
extern double Level4 = 0.618;
extern double Level5 = 1.618;

  ObjectSet("fib",OBJPROP_FIBOLEVELS,7);
  ObjectSet("fib",OBJPROP_FIRSTLEVEL+0,0     ); ObjectSetFiboDescription("fib",0,"level : "+(string)(0));
  ObjectSet("fib",OBJPROP_FIRSTLEVEL+1,Level1); ObjectSetFiboDescription("fib",1,"level : "+(string)(100*Level1));
  ObjectSet("fib",OBJPROP_FIRSTLEVEL+2,Level2); ObjectSetFiboDescription("fib",2,"level : "+(string)(100*Level2));
  ObjectSet("fib",OBJPROP_FIRSTLEVEL+3,Level3); ObjectSetFiboDescription("fib",3,"level : "+(string)(100*Level3));
  ObjectSet("fib",OBJPROP_FIRSTLEVEL+4,Level4); ObjectSetFiboDescription("fib",4,"level : "+(string)(100*Level4));
  ObjectSet("fib",OBJPROP_FIRSTLEVEL+5,Level5); ObjectSetFiboDescription("fib",5,"level : "+(string)(100*Level5));
  ObjectSet("fib",OBJPROP_FIRSTLEVEL+6,1     ); ObjectSetFiboDescription("fib",6,"level : "+(string)(100));
 
mladen:

stevenpun

You can use this code snippet as a guide

Oh yes , like that more easy for me to understand what i need to code now :)

How bout the indicator above ma channel , can you help to check it .

I add the ma candle but not work , if that is a wrong coding then i think i need to give up for it .

Have try many things but still cant make it to work .

 
stevenpun:

Oh yes , like that more easy for me to understand what i need to code now :)

How bout the indicator above ma channel , can you help to check it .

I add the ma candle but not work , if that is a wrong coding then i think i need to give up for it .

Have try many things but still cant make it to work .

stevenpun

Check the buffer numbers when you set the style to histogram (I am sure you shall see that immediately when you look at the buffer number and compare it to set index style call). Then it should work

 
mladen:

stevenpun

Check the buffer numbers when you set the style to histogram (I am sure you shall see that immediately when you look at the buffer number and compare it to set index style call). Then it should work

ok , then i will try it again :)

Thanks .

 
mladen:

stevenpun

Check the buffer numbers when you set the style to histogram (I am sure you shall see that immediately when you look at the buffer number and compare it to set index style call). Then it should work

It cant work , have changing many time it only change for the channel .

Now i am playing guessing puzzle game , few more hours sure i will splitting blood  :P

   IndicatorBuffers(10);
   SetIndexBuffer(0,Bar1);   SetIndexStyle(0,DRAW_HISTOGRAM,0,CandleShadowWidth);
   SetIndexBuffer(1,Bar2);   SetIndexStyle(1,DRAW_HISTOGRAM,0,CandleShadowWidth); 
   SetIndexBuffer(2,Candle1);SetIndexStyle(2,DRAW_HISTOGRAM,0,CandleBodyWidth);
   SetIndexBuffer(3,Candle2);SetIndexStyle(3,DRAW_HISTOGRAM,0,CandleBodyWidth);   
   SetIndexBuffer(4,buffer5);   
   SetIndexBuffer(5,buffer6);          
   SetIndexBuffer(6,buffer3);SetIndexStyle(6,DRAW_HISTOGRAM);                     
   SetIndexBuffer(7,buffer4);SetIndexStyle(7,DRAW_HISTOGRAM);         
   SetIndexBuffer(8,buffer1);
   SetIndexBuffer(9,buffer2);



PS: Fibo Price have solve


 
stevenpun:

It cant work , have changing many time it only change for the channel .

Now i am playing guessing puzzle game , few more hours sure i will splitting blood  :P


PS: Fibo Price have solve


All I changed was this :

   SetIndexBuffer(4,buffer3); SetIndexStyle(2,DRAW_HISTOGRAM);       
   SetIndexBuffer(5,buffer4); SetIndexStyle(3,DRAW_HISTOGRAM); 

to this :

   SetIndexBuffer(4,buffer3); SetIndexStyle(4,DRAW_HISTOGRAM);       
   SetIndexBuffer(5,buffer4); SetIndexStyle(5,DRAW_HISTOGRAM); 

and it was working (if I understood what are you trying to do)

 
mladen:

All I changed was this :

to this :

and it was working (if I understood what are you trying to do)

I try to make the candle look like the picture , different color above or below ma .

But the buffer only changing for the channel .

 

 
I rewrite every things , finally work now !!! (^o^)
 
Dear mladen this indicator is not working on offline chart ,  can you please correct it