Buffers possible in an EA?

 

Hi forum,

I have an indicator which basically marks a high when the high to the left and the high to the right are lower. Similar to the fractal indicator. I use a buffer to place a dot on the bar with the highest high.

Now I would like to implement this feature into an EA. But I can't use normal buffers in an EA. So I think I need to use an object. But using a text or label object is not possible because I can't place it directly above a candle and it is way too uncomfortable to place it with the correct x/y-values. 

Does anybody have an idea how to solve this problem? 

 

If you need a visual aid, just use an arrow.

An EA does not need to have anything placed on the chart to make its calculations. 

 
Yes, it's only a visual aid for me. But how can I place an arrow above or below a bar like I do with buffers? An arrow can only be a text or label object and this can only placed by using x- and y-pixel values. Or am I wrong?
 

You are wrong

OBJ_TEXT and OBJ_ARROW can be placed by Time and Price

 

GumRai, every time I think I know everything, you show me something new... :D

 Thank you! 

 

It's not 100% working like it should do but maybe you have an idea how to correct this? I made a small script:

void OnStart()
  {
//---
   ObjectCreate(0, "OBJ", OBJ_TEXT, 0, Time[1], High[1]);
   ObjectSetText("OBJ", CharToStr(159), 8, "Wingdings", clrWhite);
  }

 

But the dot is not placed right above the bar, it is a bit lower within the bar. I also tried High[1]+10*Point but if I change timeframes or chart scale, the dot is located at a different place.

 
Awesome, works exactly like I want. Thank you!
Reason: