Simple Coding Help - No Promise.

Komal,
This is my personal system
Developed for my personal use only.
Sorry not for sale or sharing......
Though I can tell that system is targeted for 1% daily with minimal SL
Scans 200 stocks and give signals in 2-3 stocks only
Its based totally on 200 EMA, MA, DEMA and reflection of price from the same,
without looking future.
So please dont search for the same
You can also try to build the same.
see images below:





Logic is simple, based on bouncing back of price from big EMA's
That's All
Happy Trading
can you please explain little bit more
 

ajeetsingh

Well-Known Member
Hi All,

Can any one post FRAMA afl with option change N, Fast av. and Slow av.

Regards,
Chintan
I have this one.
Code:
_SECTION_BEGIN("FRAMA");
// FRAMA - Fractal Adaptive Moving Average
Price = (H+L)/2;
N = Param( "N", 16, 2, 40, 2 ); // must be even **
N3 = ( HHV( High, N ) - LLV( Low, N ) ) / N;

HH = HHV( High, N / 2 ) ;
LL = LLV( Low, N / 2 );

N1 = ( HH - LL ) / ( N / 2 );

HH = HHV( Ref( High, - N/2 ), N/2 );
LL = LLV( Ref( Low, - N/2 ), N/ 2 );

N2 = ( HH - LL ) / ( N / 2 );

Dimen = IIf( N1 > 0 AND N2 > 0 AND N3 > 0, ( log( N1+N2) - log( N3 ) )/log( 2 ), Null );

alpha = exp( -4.6 * (Dimen -1 ) );
alpha = Min( Max( alpha, 0.01 ), 1 ); // bound to 0.01...1 range

Frama = AMA( Price, alpha );

Plot( Frama, "FRAMA("+N+")", colorRed, styleThick );
Plot( EMA( C, N ) , "EMA("+N+")", colorBlue );
Plot( C, "Close", colorBlack, styleCandle );

//-----------------------------------------------------------------------
//**Odd period inputs can be allowed with the inclusion of fol code :-

//if( (N % 2) != 0 ) //or if ( (N & 1) != 0 )N ++
_SECTION_END();
 
Komal,
This is my personal system
Developed for my personal use only.
Sorry not for sale or sharing......
Though I can tell that system is targeted for 1% daily with minimal SL
Scans 200 stocks and give signals in 2-3 stocks only
Its based totally on 200 EMA, MA, DEMA and reflection of price from the same,
without looking future.
So please dont search for the same
You can also try to build the same.


Logic is simple, based on bouncing back of price from big EMA's
That's All
Happy Trading
Hi Ajeet

May be a good strategy. But dont you think that if we replace 200 EMA by any other say 100 or 89 or 50 EMA, then we can get similar charts, may be some different point of time. (displaying, as resistance, or resistance or as failed one). Then why selecting only 200 EMA

Your comments, please
 

ajeetsingh

Well-Known Member
Hi Ajeet

May be a good strategy. But dont you think that if we replace 200 EMA by any other say 100 or 89 or 50 EMA, then we can get similar charts, may be some different point of time. (displaying, as resistance, or resistance or as failed one). Then why selecting only 200 EMA

Your comments, please
Everyone has his own style of trading
I have tested all known ema's starting from 50 ema and 200 ema gave me best result so far pull back is concerned on 5mins chart.
Please you too backtest it and check results

you have seen TCS yesterday, now see it again

 
Dear seniors

please correct below code buy sell arrow not showing also if exploration add its better for me.

Abhishek


_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

TimeFrameSet(inHourly);
hA=MACD();
hB=Signal();


Hbuy= Cross((ha AND hb),0) ;
Hsell= Cross(0,(ha AND hb));

TimeFrameRestore();

tf=Param("MACD Time Frame (min)",60,1,100000,1);
tfrm=in1Minute*tf;
haBuy=TimeFrameExpand(hBuy,TFRM,expandFirst);
haSell = TimeFrameExpand(hSell,Tfrm,expandFirst);

A=MACD();
B=Signal();

Buy = IIf(Habuy,Cross(a,b),0);
Sell = IIf(Hasell,Cross(b,a),0);

Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
Short=Sell;
Cover=Buy;
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorBrightGreen, 0,L, Offset=-10);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-10);
 

chintan786

Well-Known Member
I have this one.
Code:
_SECTION_BEGIN("FRAMA");
// FRAMA - Fractal Adaptive Moving Average
Price = (H+L)/2;
N = Param( "N", 16, 2, 40, 2 ); // must be even **
N3 = ( HHV( High, N ) - LLV( Low, N ) ) / N;

HH = HHV( High, N / 2 ) ;
LL = LLV( Low, N / 2 );

N1 = ( HH - LL ) / ( N / 2 );

HH = HHV( Ref( High, - N/2 ), N/2 );
LL = LLV( Ref( Low, - N/2 ), N/ 2 );

N2 = ( HH - LL ) / ( N / 2 );

Dimen = IIf( N1 > 0 AND N2 > 0 AND N3 > 0, ( log( N1+N2) - log( N3 ) )/log( 2 ), Null );

alpha = exp( -4.6 * (Dimen -1 ) );
alpha = Min( Max( alpha, 0.01 ), 1 ); // bound to 0.01...1 range

Frama = AMA( Price, alpha );

Plot( Frama, "FRAMA("+N+")", colorRed, styleThick );
Plot( EMA( C, N ) , "EMA("+N+")", colorBlue );
Plot( C, "Close", colorBlack, styleCandle );

//-----------------------------------------------------------------------
//**Odd period inputs can be allowed with the inclusion of fol code :-

//if( (N % 2) != 0 ) //or if ( (N & 1) != 0 )N ++
_SECTION_END();
thanks Ajeet.. I also have this one. But I am looking FRAMA with N = 126
and Fast av and slow av also customizable option
 

Similar threads