Hello
How to get information using EyLanguage of a line that have been draw manually over a chart.
An interesting video that I just look at and i wanted to share with the forum.
I suppose that it could be use also to expand a line automatically or for my need, a rectangular.
http://www.markplex.com/cgi-bin/dada/ma ... 048723507/
I'm not in any manner linked nor promote this site.
Martin
Draw a line and have Easylanguage display the coordinate
- arnie
- Posts: 1594
- Joined: 11 Feb 2009
- Location: Portugal
- Has thanked: 481 times
- Been thanked: 514 times
Re: Draw a line and have Easylanguage display the coordinate
Yes, it is a very nice way to plot the value for manual trendlines.
But it seems that it doesn't work as it should in MC.
We move the line, but the text doesn't follow. We delete the trendline, but the text isn't delete.
Did I miss something?
But it seems that it doesn't work as it should in MC.
We move the line, but the text doesn't follow. We delete the trendline, but the text isn't delete.
Did I miss something?
Code: Select all
// http://www.markplex.com/tutorial64-easylanguage-drawing-tool-line.php
inputs:
decimals (2);
variables:
endLineDate (0),
endLineTime (0),
endLineVal (0),
drawToolLineRef (0),
endLineTxtRef (-1);
if barnumber = 1 or lastbaronchart then drawToolLineRef = tl_getfirst(7);
if drawToolLineRef >= 1 then begin
endLineDate = tl_getenddate(drawToolLineRef);
endLineTime = tl_getendtime(drawToolLineRef);
endLineVal = tl_getendval(drawToolLineRef);
if Text_Exist(endLineTxtRef) = false then
endLineTxtRef = text_new(endLineDate, endLineTime, endLineVal, numtostr(endLineVal, decimals))
else begin
text_setlocation(endLineTxtRef, endLineDate, endLineTime, endLineVal);
text_setstring(endLineTxtRef, numtostr(endLineVal, decimals));
end;
end;
if drawToolLineRef < 1 and Text_Exist(endLineTxtRef) then
text_delete(endLineTxtRef);
- TJ
- Posts: 7744
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Draw a line and have Easylanguage display the coordinate
Yes, it is a very nice way to plot the value for manual trendlines.
But it seems that it doesn't work as it should in MC.
We move the line, but the text doesn't follow. We delete the trendline, but the text isn't delete.
Did I miss something?
Code: Select all
// http://www.markplex.com/tutorial64-easylanguage-drawing-tool-line.php
inputs:
decimals (2);
variables:
endLineDate (0),
endLineTime (0),
endLineVal (0),
drawToolLineRef (0),
endLineTxtRef (-1);
if barnumber = 1 or lastbaronchart then drawToolLineRef = tl_getfirst(7);
if drawToolLineRef >= 1 then begin
endLineDate = tl_getenddate(drawToolLineRef);
endLineTime = tl_getendtime(drawToolLineRef);
endLineVal = tl_getendval(drawToolLineRef);
if Text_Exist(endLineTxtRef) = false then
endLineTxtRef = text_new(endLineDate, endLineTime, endLineVal, numtostr(endLineVal, decimals))
else begin
text_setlocation(endLineTxtRef, endLineDate, endLineTime, endLineVal);
text_setstring(endLineTxtRef, numtostr(endLineVal, decimals));
end;
end;
if drawToolLineRef < 1 and Text_Exist(endLineTxtRef) then
text_delete(endLineTxtRef);
are you doing this offline?
MultiCharts is an event driven program,
it requires a new tick to update the indicators.
Look up RecalcLastBarAfter for offline test.