as others on this forum, I too would like to draw some text boxes on the chart in a fixed position.
I mean a text box that always remains fixed, anchored even when the chart is moved or changed on x and y axes!
I tried using the instructions provided in other posts, and I managed quite easily to anchor the y coordinate of the text box.
Unfortunately I can not find a satisfactory method to anchor the x coordinate of the text box.
In fact, with the solution that currently I adopted in my example, by changing the time on the x axis of the chart, I get the text box moves to the right or to the left, and does not remain anchored as desired.
Would you have any suggestions ?
For the future, it would be nice and maybe a lot easier if it were possible to draw the text or trendlines directly using the coordinates x and y fixed in pixels of the screen, don't you think so !!!
Thanks and regards.
Massimo
Code: Select all
Vars:
vMostLeftDateTime(0),
vMostRightDateTime(0),
vHighestDispValue(0),
vLowestDispValue(0),
vRangeDateTime(0);
//
//
RecalcLastBarAfter(0.1);
//
//
vMostLeftDateTime = GetAppInfo(aiLeftDispDateTime);
vMostRightDateTime = GetAppInfo(aiRightDispDateTime);
vHighestDispValue = GetAppInfo(aiHighestDispValue);
vLowestDispValue = GetAppInfo(aiLowestDispValue);
//
once Value1=Text_New_Dt((vMostLeftDateTime+0.05),((vHighestDispValue-vLowestDispValue)*0.5 + vLowestDispValue),"TestBox");
Text_SetLocation_DT(Value1,(vMostLeftDateTime+0.05),((vHighestDispValue-vLowestDispValue)*0.5 + vLowestDispValue));