Attachments forums

List of attachments posted on this forum.


All files on forums: 163322

Re: MT4 Indicator requests and ideas

Eis, Thu Jul 24, 2025 1:08 am

I was wondering if someone could please make the ADX (all three lines) to repaint (calculate future bar)
I am experimenting, thanks! + -

Snippets that might help ⬇️

Code: Select all

////// Order Logic ///////////////

endbar = BarCount - 1;
    }
    //
    result = Null;
    for( i = startbar; i <= endbar; i++ ) {
        SumI = 0;
        for( k = 0; k < period; k++ ) {
            weight = period - k;
            SumI += weight * array[i - k];
        }
        result[i] = SumI;
    }
    return result / VarSum( period );  

/////////// Repainting Logic /////////////////

function aFishFunc( period ) {
    MaxH = HHV( H, period );
    MinL = LLV( L, period );
    midbar = ( H + L ) / 2;
    
    array1  = 2 * ( ( midbar - MinL ) / ( MaxH - MinL + 1e-30 ) - 0.5 );
    Value = AMA2( array1, 0.33, 0.67 );
    Value = Min( Max( Value, -0.999 ), 0.999 );

    array2 = log( ( 1 + Value ) / ( 1 - Value ) );
    aFish = AMA2( array2, 0.5, 0.5 );
    return IIf( aFish > 0, 10, -10 );
}

function VarSum( per ) {
    result = per;
    for( i = 1; i < per; i++ )
        result += per - i;
    return result;
}
   
All files in topic