FRAMA by footon

46659 downloads / 6236 views / Created: 24.05.2013
1 2 3 4 5
 Average Rating: 0

Indicator Description

FRAMA

Forum link: Footon's indi corner

Comments

Code in line 133 is wrong
Sorry, i put thw comment in the wrong indicator, please remove it.
One thing you can do to optimize it is to precompute the higuer highs and lower lows and then in the main loop simply use this code:

for (int iBar = iFirstBar; iBar < Bars; ++iBar)
{
double Hi1 = HH[iBar];
double Lo1 = LL[iBar];
double Hi2 = HH[iBar - PeriodFRAMA];
double Lo2 = LL[iBar - PeriodFRAMA];
double Hi3 = Math.Max(Hi1, Hi2);
double Lo3 = Math.Min(Lo1, Lo2);

double N1 = (Hi1 - Lo1) / PeriodFRAMA;
double N2 = (Hi2 - Lo2) / PeriodFRAMA;
double N3 = (Hi3 - Lo3) / PeriodFRAMA2;
double D = (Math.Log(N1 + N2) - Math.Log(N3)) / log2;
double ALFA = Math.Exp(-4.6 * (D - 1.0));

ExtMapBuffer1[iBar] = ALFA * adBasePrice[iBar] + (1 - ALFA) * ExtMapBuffer1[iBar - 1];
}
hello dear
Please add the following indicator
Chande kroll stop in Forex Strategy Builder
Risk warning: Forex, spread bets and CFD are leveraged products. They may not be suitable for you as they carry a high degree of risk to your capital and you can lose more than your initial investment. You should ensure you understand all of the risks.
Copyright © 2006 - 2025, Forex Software Ltd.;