Snap drawing trenline on candle price high/low
Hallo,
i try to create EA to draw manually trendlines between high and low prices from candles.
The coordinates comes from left mouse click.
How can i find the nearest candle-high or low, to snap the line on the candle?
Thanks for replys
Renato
use:
long time;
double price;
int w;
ChartXYToTimePrice(0, int(lparam), int(dparam), w, time, price);
under the OnChartEvent, then search the nearest appearance of time in your copyrates-table. Result is your candle.
Hallo,
i try to create EA to draw manually trendlines between high and low prices from candles.
The coordinates comes from left mouse click.
How can i find the nearest candle-high or low, to snap the line on the candle?
Thanks for replys
Renato