Request for help with label on right side of a trendline

 

Hi everyone,

I'm using a fib-tool that draws trend lines with labels at the right side, something I find very convenient, so I want my trend line‌ to have a label on the right side too.

‌I've added a label in the code‌, and the compile is without errors, but the label does not show up. Can anyone tell me what I should do differently please?

Robert‌

Files:
 
extern int      BarsAhead = 2;
int             TextBarsAhead=2;

      ObjectCreate(label, OBJ_LABEL, 0, T2+BarsAhead+TextBarsAhead, price1);
  1. Labels are relative to pixels. You don't set them in Create.
  2. You want a text, position is relative to time and price.
  3. Datetime T2 plus 4 seconds is still T2. Multiply the 4 by PeriodSeconds() to get bars a head.
 

Thanks you for your explanation, I understand I was on the wrong track.


have a nice day

 
ReactoFX:

Thanks you for your explanation, I understand I was on the wrong track.


have a nice day






Have you modified indicator? could y please share me? thank much.

Reason: