I use Text_New_BN to define the location of a Text on charts
Strange is that the Text is misplaced by few bars
Code
Code: Select all
if (MouseClickCtrlPressed and MouseClickShiftPressed) then begin
print (MouseClickBarNumber);
ClickTime = MouseClickDateTime;
A_Bar_Number = MouseClickBarNumber;
PriceVal = MouseClickPrice;
ValToShow = GVGetNamedInt("NumberOnChart",0);
GVSetNamedInt("NumberOnChart",ValtoShow + 1);
Text_ID3 = text_new_BN(A_Bar_Number, PriceVal, numtostr(ValtoShow,0));
// print (A_Bar_Number:0:0, " ", Priceval:5:5, " ", valtoshow:0:0);
Text_SetBorder(Text_ID3, True);
text_SetColor(Text_ID3,Black);
text_setsize(Text_ID3,10);
text_setfontname(Text_ID3,"Verdana");
end;