Dissecting the Nest Plus Auto Trading API

jagankris

Well-Known Member
Yusi/Jagankris,

Had a chat with customer support of Omny...

Customer - I want to Send Buy/Sell Order from Excel to Now,Does NestPlus have any role here ?some api ?
or some feature readiyl available

HelpDesk3 - there is product called plus api
Plus Trading Plugin product is an interface that allows you to trade based on signals generated from charting applications like AmiBroker. Plus Trading Plugin Product seamlessly integrates the charting application with your Nest Trader trading application.
you need to write plus api function inside your ambi broker codes based on that it will execute the orders in Nest Trader

Customer- I do not want to use Amibroker - Just excel

HelpDesk3 -no sir

Customer - So some charting application is necessary

HelpDesk3
yes sir

Confused a bit ....Any specific pointers you could provide ?

Regards,
Raju
Dear Raju,

The answers given from the customer support is wrong.

In theory It should be possible to place the buy and sell order from Excel.
NestPlus.dll is the dynamic linked library which enables the user to get connected and place buy or sell order with Nest Trader.
So subscribe to Nestplus api from Omnesys.
Get the documentation of the API.

Sample example - http://www.codematic.net/excel-development/excel-xll/excel-xll-call.htm
 

yusi

Well-Known Member
In theory It should be possible to place the buy and sell order from Excel.
NestPlus.dll is the dynamic linked library which enables the user to get connected and place buy or sell order with Nest Trader.
So subscribe to Nestplus api from Omnesys.
Get the documentation of the API.

Sample example - http://www.codematic.net/excel-development/excel-xll/excel-xll-call.htm
JK, directly accessing the dll will not work. You will have to go the COM route. There is a required pass-thru the underlying .exe, NOW or Nest as the case may be.
 

mastermind007

Well-Known Member
Dear Raju,

The answers given from the customer support is wrong.

In theory It should be possible to place the buy and sell order from Excel.
NestPlus.dll is the dynamic linked library which enables the user to get connected and place buy or sell order with Nest Trader.
So subscribe to Nestplus api from Omnesys.
Get the documentation of the API.

Sample example - http://www.codematic.net/excel-development/excel-xll/excel-xll-call.htm
JK

I too had gotten the same answer and honestly, customer service folks are telling us what they've been instructed. They are not programmers or techies with a mandate to sell the subscription. What you do with it is your headache.
 

jagankris

Well-Known Member
Dear Yusi,

_SECTION_BEGIN("ALGO");
ClientID = ParamStr("ClientId","DJ9276-13906");
Symbol= ParamStr("Symbol","DLF-EQ");
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)
{
plusObject = CreateStaticObject("Nest.PlusApi");
plusObject.SetObjectName("DryRun");

if(plusObject)
{
plusObject.SetObjectName(ClientID);
if(Cond AND Checkdt != dt )
{
if(LastValue(Buy) OR LastValue(Cover))
{
plusObject.SetObjectName("DryRun");
plusObject.PlaceOrder("BUY",RefNumber, "NSE",Symbol,"DAY","LIMIT",AplliedQuantity,Price,0 ,1,"MIS",ClientID);
}
if(LastValue(Short) OR LastValue(Sell))
{
plusObject.SetObjectName("DryRun");
plusObject.PlaceOrder("SELL",RefNumber, "NSE",Symbol,"DAY","LIMIT",AplliedQuantity,Price,0 ,1,"MIS",ClientID);}
StaticVarSet("RefNumber",RefNumber+1);
StaticVarSet("lastdt",dt );
}
}
}
_SECTION_END();

What is wrong with the code I am getting the error ?
"Objectname is not set, SetObjectName is not called".

TIA.
 

yusi

Well-Known Member
What is wrong with the code I am getting the error ?
"Objectname is not set, SetObjectName is not called".

TIA.
Logged into Plus? 99% -- if you open the Plus Dashboard, you will see that the lock against Plus Trading Plugin is closed.

There are other issues... but later.

P.S. Please paste your code using the code tag. The indentation is lost; it is hard to read, things that may appear as errors are not so, etc.
 
Last edited:

VJAY

Well-Known Member
Dear Yusi,

_SECTION_BEGIN("ALGO");
ClientID = ParamStr("ClientId","DJ9276-13906");
Symbol= ParamStr("Symbol","DLF-EQ");
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)
{
plusObject = CreateStaticObject("Nest.PlusApi");
plusObject.SetObjectName("DryRun");

if(plusObject)
{
plusObject.SetObjectName(ClientID);
if(Cond AND Checkdt != dt )
{
if(LastValue(Buy) OR LastValue(Cover))
{
plusObject.SetObjectName("DryRun");
plusObject.PlaceOrder("BUY",RefNumber, "NSE",Symbol,"DAY","LIMIT",AplliedQuantity,Price,0 ,1,"MIS",ClientID);
}
if(LastValue(Short) OR LastValue(Sell))
{
plusObject.SetObjectName("DryRun");
plusObject.PlaceOrder("SELL",RefNumber, "NSE",Symbol,"DAY","LIMIT",AplliedQuantity,Price,0 ,1,"MIS",ClientID);}
StaticVarSet("RefNumber",RefNumber+1);
StaticVarSet("lastdt",dt );
}
}
}
_SECTION_END();

What is wrong with the code I am getting the error ?
"Objectname is not set, SetObjectName is not called".

TIA.
Dear jagan,
What's this code?Is this auto trading afl?If so what are the necessery settings need to do this?for educative purpose to understand auto trading :)
 

jagankris

Well-Known Member
Dear jagan,
What's this code?Is this auto trading afl?If so what are the necessery settings need to do this?for educative purpose to understand auto trading :)
Dear VJAY,

This is the code for SAR type buy sell semi auto trading with Nest trader.
For fully automatic we should clear NCFM exam and get our id mapped to dealer type with ZERODHA.
So that we need not approve each time the buy sell order.

This could should be placed at the end of the trading system.
Say - SuperTrend for an example.

For the code to work
I have asked ZERODHA to enable 5 days free trial of the NestPlus API.They replied that the API has been enabled but in the plus dashboard the plugin is yet to be unlcoked or enabled for my id.Zerodha has said that they look in to the issue and get back.
So waiting.

Probably on monday I should be able to tell clearly.
 

iTrade

Well-Known Member
Was anyone able to use the plusApi in vb.net or c#. Can you please tell me settings like did you add any reference or imported a library? A code sample will also help..

I am getting error for following statement " Cannot create ActiveX component"

Dim plusApi1 = CreateObject("Nest.PlusApi")

Anybody?
 

VJAY

Well-Known Member
Dear VJAY,

This is the code for SAR type buy sell semi auto trading with Nest trader.
For fully automatic we should clear NCFM exam and get our id mapped to dealer type with ZERODHA.
So that we need not approve each time the buy sell order.

This could should be placed at the end of the trading system.
Say - SuperTrend for an example.

For the code to work
I have asked ZERODHA to enable 5 days free trial of the NestPlus API.They replied that the API has been enabled but in the plus dashboard the plugin is yet to be unlcoked or enabled for my id.Zerodha has said that they look in to the issue and get back.
So waiting.

Probably on monday I should be able to tell clearly.
Thanks jagan....:) once you start using it please share more info....we can make some profitable system and give it to our kids to play & earn :)
 
Hi Jagankrish,

How did you manage to " get our id mapped to dealer type with ZERODHA"?

So far this is the biggest block of getting the real flavour of ALGO Trading in indian market.

If you could help on this, that would be great..



Dear VJAY,

This is the code for SAR type buy sell semi auto trading with Nest trader.
For fully automatic we should clear NCFM exam and get our id mapped to dealer type with ZERODHA.
So that we need not approve each time the buy sell order.

This could should be placed at the end of the trading system.
Say - SuperTrend for an example.

For the code to work
I have asked ZERODHA to enable 5 days free trial of the NestPlus API.They replied that the API has been enabled but in the plus dashboard the plugin is yet to be unlcoked or enabled for my id.Zerodha has said that they look in to the issue and get back.
So waiting.

Probably on monday I should be able to tell clearly.
 

Similar threads