amibroker afl

johnnypareek

Well-Known Member
#11
chk now

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

//SetTradeDelays(1,1,1,1);
SetPositionSize(1,spsShares);
Buy_f = Param("Buy Filter",5,0,20,0.1);
Sell_f = Param( "Sell Filter",5,0,20,1);

Plot(C,"Price",IIf(O>C,colorRed,colorGreen),styleBar);

Buy=Cross(EMA(C,5),EMA(C,8));
Sell=Cross(EMA(C,8),EMA(C,5));
Short = Sell;
Cover = Buy; 

BuyPrice=ValueWhen(Buy,C-Buy_f,1);
SellPrice=ValueWhen(Sell,C+Sell_f,1);
ShortPrice=ValueWhen(Sell,C+Sell_f,1);
CoverPrice=ValueWhen(Buy,C-Buy_f,1);

GraphXSpace = 5;
dist = 2.5*ATR(10);
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n" + (C[ i ]-Buy_f), i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "sell\n" + (C[ i ]+Sell_f), i, L[ i ]+dist[i], colorRed);
}
 
#12
Hi johnnypareek,

After long time we got some god sent who is able to help us convert our idea into AFL....

I have one such small idea about Fibo....mostly its available on swings...auto plotting...and we can shift swing high or low as we require....

But i wanted it differently like ...in any time frame user select(Intra-what ever time interval or /daily/wkly/mnth/qtry) ...Wants to plot Fibo retrace/extn...based on Highest and lowest of that interval and plot fibo instead of plotting on regular swing.


It will help us a great deal in keeping track of multiple stock without making much change....

Like just for example...in 5min chart it should select HOD(high of day) or LOD(low of day) and plot fibo....

Thanks a lot for your valuable time/knowledge with which you are making life easy for traderji's novice users like me.

I hope i have explained properly what i want in AFL.

Regards,
Kedarnath
 
#13
chk now

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

//SetTradeDelays(1,1,1,1);
SetPositionSize(1,spsShares);
Buy_f = Param("Buy Filter",5,0,20,0.1);
Sell_f = Param( "Sell Filter",5,0,20,1);

Plot(C,"Price",IIf(O>C,colorRed,colorGreen),styleBar);

Buy=Cross(EMA(C,5),EMA(C,8));
Sell=Cross(EMA(C,8),EMA(C,5));
Short = Sell;
Cover = Buy; 

BuyPrice=ValueWhen(Buy,C-Buy_f,1);
SellPrice=ValueWhen(Sell,C+Sell_f,1);
ShortPrice=ValueWhen(Sell,C+Sell_f,1);
CoverPrice=ValueWhen(Buy,C-Buy_f,1);

GraphXSpace = 5;
dist = 2.5*ATR(10);
for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n" + (C[ i ]-Buy_f), i, L[ i ]-dist[i], colorGreen );
if( Sell[i] ) PlotText( "sell\n" + (C[ i ]+Sell_f), i, L[ i ]+dist[i], colorRed);
}
thank u so much for ur time. please check below pic.

 
#15
Hello all afl experts!!

I have an offer to you all. I want to improve on the current (revised) gfdl afl. It is a sample strategy and is worthless for real auto trading. But with some safety features introduced it will serve well. The plugin has to work semi auto. Basically it means delivering orders to the API automatically, where I press the "PLACE" button to trade.

Here is what I want. If you want to do it, I would pay you a reasonable fee. The willing writers please PM me.

a) change its stop n reverse approach. An exit point is not necessarily a good reentry point. But gfdl afl ignores this fact. Entry and exit will be based on different rules and at different times.
b) stop entry in sideways (non-volatile) market. I will supply the logic and strategy. You just have to code it.
c) I will give different logic for exits

Waiting eagerly to hear from you. If you don't want to do it please pass on this message to your competent friends.
 

Similar threads