Dissecting the Nest Plus Auto Trading API

yusi

Well-Known Member
Hi yusi and others,

Any help would be highly appreciated. I wish a small code to execute buy orders at market in any programming language. Can nest plus help me do this for now or nest in zerodha. A small program with all hardcoded values would be enough.

I wish to do the following.
start
loop the following every second
if (nifty, CE, 8500, mar31)>= 25 //this I was reading from excel using macro after link to excel.
{
buy (nifty, ce, 8600,mar31) at market //this I wish to do
buy (nifty, pe, 8400,mar31) at market //this I wish to do
exit loop
}
end program

Does nest provide any sample code for the order execution line through VBA or other language.
Check these two links ( link1 and link2 ) where others were trying to place orders via Excel. Or better use the Search this Thread option to look for posts containing "Excel".

In your case, you would have to put a timer loop around the buy (as you have mentioned), and stop the timer once the buy is triggered. The symbol would correspond to the trading symbol used in Nest/NOW. Since Excel does not create static objects, you would need a flag to ensure that CreateObject and SetObjectName is only executed once.

Not the least, I have only passing knowledge in Excel. Others may be able to help better.
 

lemondew

Well-Known Member
Thx yusi,

For letting me know about the window which have to be manually clicked.

Thx Tracerbullet,

For showing me the windows automation part.


Check these two links ( link1 and link2 ) where others were trying to place orders via Excel. Or better use the Search this Thread option to look for posts containing "Excel".

In your case, you would have to put a timer loop around the buy (as you have mentioned), and stop the timer once the buy is triggered. The symbol would correspond to the trading symbol used in Nest/NOW. Since Excel does not create static objects, you would need a flag to ensure that CreateObject and SetObjectName is only executed once.

Not the least, I have only passing knowledge in Excel. Others may be able to help better.
 
Last edited:
Hi,
I use following code in excel . But I got ERROR450
but in nest trader I got following line .
PlusApi_DryRun_22_57_08 18-6-2016 22:57:8:302 ACTIVE 0
the code I used in macro is as follow

Sub Test()
Set plus = CreateObject("Nest.PlusApi")
Call plus.SetObjectName("DryRun")
Call plus.PlaceOrder("BUY", "Matlab01", "NSE", "YESBANK-EQ", "DAY", "LIMIT", 10, 555, 0, 0, "NRML", "DH0292")

End Sub
Please help me
DECO
 
Hi Yusi,
I am new to Amibroker and Nest Plus Auto Trading. I am using the following code copied from earlier post in this thread to test order placing from Ami to Nest. But It is showing errors. Thumbnail of error attached

Code:
//Create the Nest Plus API object
plusObject = CreateStaticObject( "nest.plusapi" );

//Assign the object a name
plusObject.SetObjectName( "DryRun" );

//Place a limit buy order using NRML (near the lower circuit, CMP is 110)
plusObject.PlaceOrder("BUY", "OrderNo_1", "NSE", "HINDALCO-EQ", "DAY", "LIMIT", 1, 100.15, 0, 1, "CNC", "RB1886");
Can you please guide me, where i am doing mistake. I am subscribed to Nest Plus API. Amibroker Version is 6.002. Nest Trader v3.11.4.


thank you in advance
 

Attachments

yusi

Well-Known Member
Hi,
I use following code in excel . But I got ERROR450
For error 450 in Excel, MSDN says "Wrong number of arguments or invalid property assignment (Error 450)"

The thing to check if your version of Nest Plus Api uses the same function signature of PlaceOrder as earlier. Essentially, you will have to check the Plus Api documentation.
 

yusi

Well-Known Member
Can you please guide me, where i am doing mistake. I am subscribed to Nest Plus API. Amibroker Version is 6.002. Nest Trader v3.11.4.
The error clear says "Incorrect number of parameters".

Checking the signature of the Nest Plus API in 3.11.4, you need 3 additional parameters at the end after clientID :

- string AlgoIdentifier
- string AlgoSeqNumber
- string Vendor ID

You will have to check the documentation (or use trial-error) to learn what these represent and, more importantly, are intended to do.
 
Hi Yusi,

Thanks for the prompt reply. I succeeded :clap: in placing order from Ami to Nest. I just placed the dummy data in the last three parameters in PlaceOder method. But not so happy, as it rejected for MCX order. What is the procedure for Semi autotrading in MCX. i read MCX circular-042-2007:D:D. But i don't think its feasible for a small time trader.

Again Many thanks to Yusi.


Brahmam
 

Attachments

Similar threads