[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

text on the left side of the current bar?



PureBytes Links

Trading Reference Links

hello,

i'm using a simple indicator to show me the pivots with text.

question is, how do i have to change the code that the text will appear on
the left side of the points?
any ideas how i can show the text on the other side of the dots?
i think it's not very difficult but i can't find the solution <g>

thanks jim


Var: Hi(0),   Lo(99999),   YHi(0),   YLo(99999),   YCl(0),   Pivot(0),
R1(0),  S1(0),   R2(0),   S2(0),   Off(1), Ctr(0);

IF BarNumber = 1 THEN BEGIN
 YHi = H;
 YLo = L;
 YCl = C;
END ELSE IF Date[1] < Date THEN BEGIN
 YHi = Hi;
 YLo = Lo;
 YCl = C[1];
 Hi = H;
 Lo = L;
 Off = 0;
 Ctr = 0;
END ELSE BEGIN
 IF H > Hi THEN Hi = H;
 IF L < Lo THEN Lo = L;
 Off = Off[1];
 Ctr = Ctr[1] + 1;
END;

Pivot = (YHi + YLo + YCl) / 3;
R1 = (2 * Pivot) - YLo;
S1 = (2 * Pivot) - YHi;
R2 = (Pivot - S1) + R1;
S2 = Pivot - (R1 - S1);

IF Off = 0 THEN BEGIN
 IF Mod(Ctr,2) = 0 THEN Plot1(R1,"R") ELSE IF Mod(Ctr,2) = 1 THEN
Plot1(R2,"R");
 IF Mod(Ctr,2) = 0 THEN Plot2(S1,"S") ELSE IF Mod(Ctr,2) = 1 THEN
Plot2(S2,"S");
 Plot3(Pivot,"Pivot");
END;

Var: IDR2(-1),
  IDR1(-1),
  IDPiv(-1),
  IDS1(-1),
  IDS2(-1);

IF LastBarOnChart THEN BEGIN
 IDR2 = Text_New(D,T+3*BarInterval,R2,NumToStr(R2,2));
 Text_SetColor(IDR2,3);
 IDR1 = Text_New(D,T+3*BarInterval,R1,NumToStr(R1,2));
 Text_SetColor(IDR1,3);
 IDPiv = Text_New(D,T+3*BarInterval,Pivot,NumToStr(Pivot,2));
 Text_SetColor(IDPiv,8);
 IDS1 = Text_New(D,T+3*BarInterval,S1,NumToStr(S1,2));
 Text_SetColor(IDS1,5);
 IDS2 = Text_New(D,T+3*BarInterval,S2,NumToStr(S2,2));
 Text_SetColor(IDS2,5);
END;