Autotrading / algo trading

#11
I can modify this for you. please post ur req. i will try.

ClientID = ParamStr("ClientId","000000");
Symbol= ParamStr("Symbol","NIFTY13APRFUT");
Price=NumToStr(C,8.3,True);
Quantity=Param("Quantity",1,1,100,1);
OE = ParamList("Order Execution","Immediate,On Candle Completion",1);
AT = ParamToggle("AutoTrade","No,Yes");

if(OE=="On Candle Completion")
{
Buy=Ref(Buy,-1);
Short=Ref(Short,-1);
Sell=Ref(Sell,-1);
Cover=Ref(Cover,-1);
}

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

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

Please try to add some features from GFDL-NEST plugin if possible.

Thanks.
 
#14
ClientID = ParamStr("ClientId","000000");
Symbol= ParamStr("Symbol","NIFTY13APRFUT");
Price=NumToStr(C,8.3,True);
Quantity=Param("Quantity",1,1,100,1);
OE = ParamList("Order Execution","Immediate,On Candle Completion",1);
AT = ParamToggle("AutoTrade","No,Yes");

if(OE=="On Candle Completion")
{
Buy=Ref(Buy,-1);
Short=Ref(Short,-1);
Sell=Ref(Sell,-1);
Cover=Ref(Cover,-1);
}

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

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

Please try to add some features from GFDL-NEST plugin if possible.

Thanks.
GFDL Plugin contains so many features. quote your specific one or two requirement. because i cannot spare much time on this. if anything specific requirement then i can help you.
 
#16
Hi leoguy7,



Above AFL is the plugin to connect ami to nest with any data feeder and you have to subscribe for API with nest (Omnysys) 295/month

or contact GDFL for their data feeder and plugin, ll cost u 1300 to 1900/ month
 
Last edited:
#20
Install trial version GFDL data feeder it ll copy gfdl ami plugin into your C:\Program Files\AmiBroker\Formulas\GFDL-NEST . copy that folder and save and then uninstall data feeder. plugin works only with subscribe of GFDL data feeder in amibroker
 

Similar threads