Parameters set up through amibroker afl need - useful to all

Dear Friends,

Can anybody help me with afl coding for setting up parameters in Amibroker.
This will be useful for setting Robo trading.

I will post the super trend indicator (up to 90%) accuracy in success rate
for the benefit of all after incorporating the parameters afl coding.

Auto Signal Analysis Type : Optimized (Less Signals)/Correlated (More signals)
Show Stop loss line : Yes/No
Show LTP Line : Yes/No
Risk disclosure : Keep warning me/Stop warning.
Entry order type : On the same candle/on next new candle
Exit Order type : On the same candle/on next new candle
Trade entry : Close price/High Low Breakout
Order type : Long/short/both
Average trades : Allowed/not allowed
Target method : Automatic/percentage/points/none
Target 1 : according to the above settings.
Target 1 booking : Don't book/50%/100%
Target 2 : according to the above settings
Target 2 booking : Don't book/50%/100%
Sl method : Automatic/percentage/points/none
Stop loss : according to the above settings
Show message box : yes/no
Display size : small/medium/large
Box Blend code 1 : RGB (necessary code)
Box Blend code 2 : RGB (necessary code)

Thanks in advance



Well-Known Member
Please see if content of this post is of any help:

http: (remove space) //www(dot)marketcalls(dot)in/amibroker/amibroker-auto-trading-control-nestnow-terminal(dot)html
& also
http: (remove space) //www(dot)marketcalls(dot)in/amibroker/amibroker-button-style-manual-trading-control-nestnow(dot)html

KAKA Ji's contribution is:

ClientID = ParamStr("ClientId","000000");
Symbol= ParamStr("Symbol","NIFTY13APRFUT");
Slp= Param("Slippage%", 0.05);
Bprice= NumToStr(Ref(H,-1)*(1+slp/100),8.3,True);
Sprice= NumToStr(Ref(L,-1)*(1-slp/100),8.3,True);
OE = ParamList("Order Execution","Immediate,On Candle Completion",1);
AT = ParamToggle("AutoTrade","No,Yes");

if(OE=="On Candle Completion")

AplliedQuantity=IIf(LastValue(Buy) AND LastValue(Cover) OR LastValue(Short) AND LastValue(Sell),Quantity*2,Quantity);
RefNumber = Nz(StaticVarGet("RefNumber"));
dt = LastValue( DateTime() );
Cond=LastValue(Buy) OR LastValue(Short) OR LastValue(Sell) OR LastValue(Cover);

plus = CreateStaticObject("Nest.PlusApi");
if(Cond AND Checkdt != dt )
if(LastValue(Buy) OR LastValue(Cover)){plus.PlaceOrder("BUY",RefNumber, "NFO",Symbol,"DAY","LIMIT",AplliedQuantity,BPrice, 0,1,"NRML",ClientID);}
if(LastValue(Short) OR LastValue(Sell)){plus.PlaceOrder("SELL",RefNumber, "NFO",Symbol,"DAY","LIMIT",AplliedQuantity,SPrice, 0,1,"NRML",ClientID);}
StaticVarSet("lastdt",dt );

Best Wishes.....

Similar threads