Need help for drawing arrow

 

Hi guys, im coding an indicator but im having trouble to draw a floating arrow.

I want to get floating arrow like picture no.1 where the arrow is floating above/below the price.

Picture no.2 is the example of the difference, the arrow is right at the price, which make me harder to see the chart.

What should i use to get the floating arrow?

Thx in advance.

Files:
fractal1.png  41 kb
fractal2.png  29 kb
 

You need to use

//--- Set the vertical shift of arrows in pixels 
   PlotIndexSetInteger(0,PLOT_ARROW_SHIFT,shift);
 
Taras Slobodyanik:

You need to use

This is not working with mql4. I think the question is about mql4 as the screenshots are from MT4.
 
Alain Verleyen:
This is not working with mql4. I think the question is about mql4 as the screenshots are from MT4.

Well, then need to make the parameter "Offset for arrows" and add/subtract offset from highs/lows.

 
Taras Slobodyanik:

Well, then need to make the parameter "Offset for arrows" and add/subtract offset from highs/lows.

They will not. No new development for MT4.

You have to code it.

 

Hi, thanks a lot for the replies.

Taras Slobodyanik:

You need to use

I try that, but not working.

Alain Verleyen:
This is not working with mql4. I think the question is about mql4 as the screenshots are from MT4.

Yes im using mql4.

Taras Slobodyanik:

Well, then need to make the parameter "Offset for arrows" and add/subtract offset from highs/lows.

I have tried to add/subtract from high and low. The problem is when i go to lower time frame or switch pair with different digits (ie. eurusd to usdjpy), the arrows goes wider.

But in picture 1, the fractals has constant range even for lower time frame. So i thought there maybe some function i can use instead of add/subtract from high/low.

 
Alain Verleyen:

They will not. No new development for MT4.

You have to code it.

The fractal from picture 1 is the one from MT4. I cant find the source code for it. I have already search for the code, but i only found the one in picture 2.

Do you think in picture 1 fractal, they code it manually to have constant vertical range?

 
herjanto:

The fractal from picture 1 is the one from MT4. I cant find the source code for it. I have already search for the code, but i only found the one in picture 2.

Do you think in picture 1 fractal, they code it manually to have constant vertical range?

  1. Years ago I once saw the code for #1. It wasn't constant, but a function of timeframe. Something like 2 pips on M1 to 1000 on MN1.
  2. I personally just get the chart limits and add 1-2%
 
whroeder1:
  1. Years ago I once saw the code for #1. It wasn't constant, but a function of timeframe. Something like 2 pips on M1 to 1000 on MN1.
  2. I personally just get the chart limits and add 1-2%

Hi thanks for your help. You gave me many new knowledge here!

1. I thought about that too, but i dont think that is really good to code something like that. But if no other way, i will use it.

2. Do you use 0.02(WindowPriceMax() - WindowPriceMin()) or 0.02(High[WindowFirstVisibleBar()] and Low[WindowFirstVisibleBar()]) for this? But i get the idea and i will try it.

Thanks a lot!

 
whroeder1:
  1. Years ago I once saw the code for #1. It wasn't constant, but a function of timeframe. Something like 2 pips on M1 to 1000 on MN1.
  2. I personally just get the chart limits and add 1-2%

Hi i have tried your suggestions and it works great! I find what i want now.

i just add a variable and add/substract from the point i want.

double addValue = 0.015*(WindowPriceMax() - WindowPriceMin());

Thanks a lot!!

Reason: