OrderMan - Ordering interface for NOW + Amibroker

Dear TracerBullet

I figured out a raw way of selective cancel of order.....here is the code for Nest Trader..

Condition: Trading Symbol must be the first column of open order

SetTitleMatchMode, 1
WinMenuSelectItem, Welcome Broker id, ,View Order,Order
sleep, 500
WinMaximize,Order Book - Broker id
WinActivate
SetKeyDelay, 50,50
ControlSend, SysListView321, ^a, Order Book - Broker id
ControlSend, SysListView321, ^a, Order Book - Broker id
ControlSend, SysListView321, ^a, Order Book - Broker id
ControlSend, SysListView321, ^a, Order Book - Broker id
sleep, 1000
SetKeyDelay, 50,50
ControlClick, Show Filters, Order Book - Broker id, Show Filters,,,NA
Sleep, 1000
ControlClick, x36 y107, Order Book - Broker id,,,,NA
Sleep,500
SetKeyDelay, 50,50
ControlSend, Edit1, silvermic16augfut, Order Book - Broker id
Sleep,2000
ControlSend, SysListView321, ^a, Order Book - Broker id
Sleep,2000
ControlClick, Button2, Order Book - Broker id, Cancel,,,NA
Sleep,50
ControlClick, Button2, Order Book - Broker id, Cancel,,,NA
Sleep,50
ControlClick, Button2, Order Book - Broker id, Cancel,,,NA
Sleep,50
ControlClick, Button2, Order Book - Broker id, Cancel,,,NA
Sleep,2000
WinClose, Nest trader
Sleep,50
WinClose, Nest trader
Sleep,50
WinClose, Nest trader
Sleep,50
WinClose, Nest trader
Sleep,50
ControlClick, x36 y107, Order Book - Broker id,,,,NA
Sleep,1000
ControlSend, Edit1,{Del 15}, Order Book - Broker id
WinMinimize,Order Book - Broker id
SetTitleMatchMode, 1
WinMenuSelectItem, Welcome Broker id, ,View Order,Net Positions
sleep, 500
WinMaximize,Net Position - Broker id
WinActivate
WinShow
control, ChooseString, silvermic16augfut, ComboBox2, Net Position - Broker id
ControlSend, SysListView321, ^a, Net Position - Broker id
sleep, 500
ControlClick, Square off, Net Position - Broker id, Square off,,,NA
Sleep, 1000
ControlClick, Button1, NEST Trader, Yes,,,NA
WinClose, NEST - Broker id
Sleep,1000
WinClose,NEST Trader
WinClose,Net Position - Broker id
Sleep,500
WinClose,NEST - Broker id
Sleep, 1500
ControlClick, Yes, NEST Trader, Yes,,,NA
 

TracerBullet

Well-Known Member
Dear TracerBullet

I figured out a raw way of selective cancel of order.....here is the code for Nest Trader..

Condition: Trading Symbol must be the first column of open order

SetTitleMatchMode, 1
WinMenuSelectItem, Welcome Broker id, ,View Order,Order
sleep, 500
WinMaximize,Order Book - Broker id
WinActivate
SetKeyDelay, 50,50
ControlSend, SysListView321, ^a, Order Book - Broker id
ControlSend, SysListView321, ^a, Order Book - Broker id
ControlSend, SysListView321, ^a, Order Book - Broker id
ControlSend, SysListView321, ^a, Order Book - Broker id
sleep, 1000
SetKeyDelay, 50,50
ControlClick, Show Filters, Order Book - Broker id, Show Filters,,,NA
Sleep, 1000
ControlClick, x36 y107, Order Book - Broker id,,,,NA
Sleep,500
SetKeyDelay, 50,50
ControlSend, Edit1, silvermic16augfut, Order Book - Broker id
Sleep,2000
ControlSend, SysListView321, ^a, Order Book - Broker id
Sleep,2000
ControlClick, Button2, Order Book - Broker id, Cancel,,,NA
Sleep,50
ControlClick, Button2, Order Book - Broker id, Cancel,,,NA
Sleep,50
ControlClick, Button2, Order Book - Broker id, Cancel,,,NA
Sleep,50
ControlClick, Button2, Order Book - Broker id, Cancel,,,NA
Sleep,2000
WinClose, Nest trader
Sleep,50
WinClose, Nest trader
Sleep,50
WinClose, Nest trader
Sleep,50
WinClose, Nest trader
Sleep,50
ControlClick, x36 y107, Order Book - Broker id,,,,NA
Sleep,1000
ControlSend, Edit1,{Del 15}, Order Book - Broker id
WinMinimize,Order Book - Broker id
SetTitleMatchMode, 1
WinMenuSelectItem, Welcome Broker id, ,View Order,Net Positions
sleep, 500
WinMaximize,Net Position - Broker id
WinActivate
WinShow
control, ChooseString, silvermic16augfut, ComboBox2, Net Position - Broker id
ControlSend, SysListView321, ^a, Net Position - Broker id
sleep, 500
ControlClick, Square off, Net Position - Broker id, Square off,,,NA
Sleep, 1000
ControlClick, Button1, NEST Trader, Yes,,,NA
WinClose, NEST - Broker id
Sleep,1000
WinClose,NEST Trader
WinClose,Net Position - Broker id
Sleep,500
WinClose,NEST - Broker id
Sleep, 1500
ControlClick, Yes, NEST Trader, Yes,,,NA
ok, i didnt read code in detail, but this is best way to start. Start with something basic that works for you and then build on it if needed, one step at a time.

You dont need so many sleeps most of the time, consider using WinWait/ WinWaitClose or some similar way to detect when a window has been opened / closed.
 
Getting error Column Order Type not found in Order Book > Open Orders
In open order window column Order Type is present. Zerodha nest version is 3.11.4
Amibroker data is GFDL data source.

If time permits can any one create a PDF file for installation.:thumb:
 

TracerBullet

Well-Known Member
Getting error Column Order Type not found in Order Book > Open Orders
In open order window column Order Type is present. Zerodha nest version is 3.11.4
Amibroker data is GFDL data source.

If time permits can any one create a PDF file for installation.:thumb:
Assuming settings are correct, you will have to debug and check

But first,
1) Make sure that the column header texts in nest ahk match with ZT
2) Make sure you have setup ini for Nest
3) Run ZT as normal user, not with admin rights

SnakeHead had written instructions in earlier posts, can look for it.

@TB,

So we can achieve something like BO with SL-M order entry apart from if we don't consider leverage and trailing SL by using orderman.:thumb:
Am I right...?
Yes, its meant to manage Entry, Stop and Target Orders. Its just an interface on top of Nest/Now F1/F2 Order windows.
 
Assuming settings are correct, you will have to debug and check

But first,
1) Make sure that the column header texts in nest ahk match with ZT
2) Make sure you have setup ini for Nest
3) Run ZT as normal user, not with admin rights

SnakeHead had written instructions in earlier posts, can look for it.
Yes I checked the same.
Code:
static ORDER_BOOK_OPEN_HEADERS_TEXT				:= ["Order Type", "Buy/Sell", "Trading Symbol", "Total Qty", "Pending Qty", "Price", "TriggerPrice", "Average Price", "Status", "NestOrderNo", "Nest UpdateTime"]
	static ORDER_BOOK_COMPLETED_HEADERS_TEXT		:= ["Order Type", "Buy/Sell", "Trading Symbol", "Total Qty", "Price", "TriggerPrice", "Average Price", "Status", "NestOrderNo", "Nest UpdateTime", "Rejection Reason"]
Setup INI for NeST
Code:
Server = Nest
WindowTitle = "NEST Trader"


ZT is running as normal user and installed in E drive.

Error I get is
Code:
346: Loop,targetHeaders.MaxIndex()
347: columnText := targetHeaders[A_Index]
348: key := targetKeys[A_Index]
350: this._checkEmpty( targetObject[key], columnText, listIdentifier )  
359: if ( value == "" )  
360: MsgBox,262144,,Column %field% not found in %listName% (1.55)
361: WinClose,controlObj.ORDER_BOOK_TITLE (0.13)
362: Exit (27.39)

One thing I want to ask from where OM tahe realtime data if any coz I don't use RTDman. I use GFDL plugin.

Edit 1: Do I need to install 32 bit AHK instead of 64 bit.

Edit 2: Actually it's not able to detect window correctly. When I removed Order Type from file then it is not able to find Buy/Sell column. So I think it's not able to detect window correctly.
 
Last edited:
I checked with Active Window Info. When I move cursor over Order Type, Buy/Sell... specifically over any column on that row I get the TEXT blank.
Is this the reason OM is not able to find Order Type cloumn TEXT.

 
Last edited: