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

 
  1. Wir sprechen hier deutsch.
  2. Irgendwie widerspricht sich das: "EA to draw manually trendlines"
  3. Wahrscheinlich wird das niemand hier für Dich machen (mal so eben).
  4. Wenn Du es nicht schaffst hilft man Dir hier!
 
RenatoLueth:

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.

Grund der Beschwerde: