Hi,
i am trying to change the mouse functions example of the EFS Function reference to draw also a horziontal line in the advanced chart from the point and at the level where i click left with the mouse, but i do not know how to insert the correct variables in the drawlinerelative() function.
Thought i could change the part in the formula like below, but it doesn't work.
... function updateClickInfo(barIndex, yValue) {
drawTextAbsolute(5,20 , "Clicked bar " + barIndex + " at " + yValue.toFixed(2),
Color.white, Color.navy, Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.BOL D,
null, 14, "ClickInfo");
drawLineRelative( -barIndex, yValue, -barIndex, yValue, PS_SOLID, 1, Color.blue, x);
} ...
Suspect that "barIndex" and "yValue" are not the types of variables that drawLineRelative() needs, but how can i get the right ones.
I also didn't find out what yValue.toFixed(2) means.
Can someone help me please?
Regards
Robert
i am trying to change the mouse functions example of the EFS Function reference to draw also a horziontal line in the advanced chart from the point and at the level where i click left with the mouse, but i do not know how to insert the correct variables in the drawlinerelative() function.
Thought i could change the part in the formula like below, but it doesn't work.
... function updateClickInfo(barIndex, yValue) {
drawTextAbsolute(5,20 , "Clicked bar " + barIndex + " at " + yValue.toFixed(2),
Color.white, Color.navy, Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.BOL D,
null, 14, "ClickInfo");
drawLineRelative( -barIndex, yValue, -barIndex, yValue, PS_SOLID, 1, Color.blue, x);
} ...
Suspect that "barIndex" and "yValue" are not the types of variables that drawLineRelative() needs, but how can i get the right ones.
I also didn't find out what yValue.toFixed(2) means.
Can someone help me please?
Regards
Robert
Comment