Snap drawing trenline on candle price high/low

Einloggen oder registrieren, um einen Kommentar zu schreiben
RenatoLueth
8
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

Carl Schreiber
Moderator
7294
Carl Schreiber  
  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!
werner111053
91
werner111053  
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.

Einloggen oder registrieren, um einen Kommentar zu schreiben