Placing indicator arrows at fixed offset (like builtin fractals) - page 2

 
yucelh:

Yes, I looked through the examples, didn't help.

Example 1) Do as fractals does, no offset at all. How is that helpful? We would like an offset. Giving an example with no offset is useless.

Example 2) Use Period(). Defined as "Returns the amount of minutes determining the used period (chart timeframe)." How is that going to provide a vertical offset for an indicator?

Please try to understand the problem first. 

  1. And yet the image shows the arrows above and below the bars just fine.
  2. What part of "offset based on Period" was unclear. Did you BOTHER to look at the code?
     switch(Period())
        {
            case     1: nShift = 1;   break;  <== one pip above   
            case     5: nShift = 3;   break;  <== three
            :
  3. I understood your problem the first time. You didn't BOTHER to understand my answer.
 
RaptorUK:
You cannot. Arrows are placed by time and price not pixels,  you can find the size of the window in pixels and the size of the window in price and scale the price to offset  . . .  but if the chart scale is adjusted manually or automatically as price changes you will have to re-adjust the offset to maintain the same pixel gap. 
The built-in iFractals function does put the arrow at an offset from the high/low of a candle without manipulating the indicator price to create an offset. Is there no inherent method to replicate this in MQL4? Is the iFractals using a custom wingding perhaps? Like the typeset for the arrow is preadjusted? Supersript/subscript maybe?
 
There is no custom wingdings. There is no super/subscribe. Fractals just places it. You want to replicate it in mq4, use the same mq4 code:
SetIndexArrow(0,119);
:
 dCurrent=High[i];
if(...) ExtUpFractalsBuffer[i]=dCurrent;
 
yucelh:
The built-in iFractals function does put the arrow at an offset from the high/low of a candle without manipulating the indicator price to create an offset. Is there no inherent method to replicate this in MQL4? Is the iFractals using a custom wingding perhaps? Like the typeset for the arrow is preadjusted? Supersript/subscript maybe?
The built in iFractals() function just returns a double,  it doesn't draw an arrow.  The built in Fractal indicator places the arrows at the high or low of the bar in question,  check the Data Window for yourself.
Reason: