OrderMan - Ordering interface for NOW + Amibroker

TracerBullet

Well-Known Member
Thanks for the quick response .

I have modified the code from gib. I'm facing few issues . I have given screen shot for your reference. The oder type is there in the open orders. But still it is showing order book is not present.
Copy paste Orderman.ini here. have set Server as Nest?
Nest is tricky because it each broker can be different. Its tested on SASOnline, Zerodha, RKSV by some of us. TSO may need some changes. Which broker do you use?

Edit - Also look at SH comments. This is tested only with NOW/Nest running as normal user
 
Last edited:
Yes, I have set server as nest, I'm using the reliance money.


"[OrderMan]
; "Nest" or "Now"
;Server = Now
Server = Nest
; Nest/NOW Window Title substring
;WindowTitle = "NOW 1.13"
WindowTitle = "NEST Trader 3.10.57.99"

; List of all available Scrips. First one is set by default
; Make sure to create config ini for each Scrip in "scrips" folder and set paramaters
; Scrip Names should match with Amibroker and with RTDMan Alias
ScripList = SBIN|TATAMOTORS|TATASTEEL|AXISBANK

; Default Entry OrderType - L/SLM/SL/M
EntryOrderType = SLM

; Enable Automatic submission of Order. User will have to click on Submit in Order window manually if disabled
AutoSubmit = true

; Toggle Price Alerts
AlertsEnabled = false

; Hotkeys for AB integration. These will trigger copy of price at cursor to Entry / Stop / Target
; It will also copy scrip alias from Amibroker Ticker ToolBar
; Set View>X-Y Labels to Always on for fastest price pick
; If Price axis Tooltip is not enabled, we will try to pick from start price of Line at cursor ( should be horizontal TL or Horizontal line )
; NOTE - This will only work when Select Tool is active
; If this also fails, we try to get price using Tooltip (Value property)
; Entry and Stop prices are set to tick size multiple using ceil/floor in direction of Trade. For long trade, Entry will use ceil and stop will use floor
; Target prices are just round off to tick size multiple
HKEntryPrice = #A
HKStopPrice = #S
HKTargetPrice = #T

; RTDMan csv path to get price
TickPath = r:\rtd\

"
 

TracerBullet

Well-Known Member
Yes, I have set server as nest, I'm using the reliance money.


"[OrderMan]
; "Nest" or "Now"
;Server = Now
Server = Nest
; Nest/NOW Window Title substring
;WindowTitle = "NOW 1.13"
WindowTitle = "NEST Trader 3.10.57.99"

; List of all available Scrips. First one is set by default
; Make sure to create config ini for each Scrip in "scrips" folder and set paramaters
; Scrip Names should match with Amibroker and with RTDMan Alias
ScripList = SBIN|TATAMOTORS|TATASTEEL|AXISBANK

; Default Entry OrderType - L/SLM/SL/M
EntryOrderType = SLM

; Enable Automatic submission of Order. User will have to click on Submit in Order window manually if disabled
AutoSubmit = true

; Toggle Price Alerts
AlertsEnabled = false

; Hotkeys for AB integration. These will trigger copy of price at cursor to Entry / Stop / Target
; It will also copy scrip alias from Amibroker Ticker ToolBar
; Set View>X-Y Labels to Always on for fastest price pick
; If Price axis Tooltip is not enabled, we will try to pick from start price of Line at cursor ( should be horizontal TL or Horizontal line )
; NOTE - This will only work when Select Tool is active
; If this also fails, we try to get price using Tooltip (Value property)
; Entry and Stop prices are set to tick size multiple using ceil/floor in direction of Trade. For long trade, Entry will use ceil and stop will use floor
; Target prices are just round off to tick size multiple
HKEntryPrice = #A
HKStopPrice = #S
HKTargetPrice = #T

; RTDMan csv path to get price
TickPath = r:\rtd\

"
ok, this is not tested with Reliance Money. You will have to take effort to identify changes needed for your broker. I assume you are running NEST and OrderMan as normal user without admin rights. Snakehead had similar issue which was solved after running as normal user.

In AHK folder, there is a spy tool - "AU3_Spy.exe". You will have to use this to identify ids of window objects specific to your Nest. Control ids are shown in "Control under Mouse Position after ClassNN" after you move cursor to target window control ( click on target window if Spy is empty). In "GUIControls/", Now.ahk contains list of all such ids and more. Nest.ahk allows overriding these ids for NEST.

In your case, its possible that the ListView ids of open/completed orders in Orderbook has different id. So try to identify correct id for your NEST.
Code:
	static ORDER_BOOK_OPEN_LIST			:= "SysListView321"
	static ORDER_BOOK_OPEN_LIST_HEADER		:= "SysHeader321"
	static ORDER_BOOK_COMPLETE_LIST		:= "SysListView322"
	static ORDER_BOOK_COMPLETE_LIST_HEADER 	:= "SysHeader322"
Now i understand this may be difficult for you, but there is no other way as i cannot test for every broker. If you find it difficult, maybe take help from friend - the code is open source.
 

Snake.Head

Well-Known Member
@TB
Can you lay down basic guidelines for code.Frd of mine what to code orderman for pi

What to check if orderman will work or not
Which file to map in settings etc
 
Last edited:

TracerBullet

Well-Known Member
@TB
Can lay down basic guidelines for code.Frd of mine what to code orderman for pi

What to check if orderman will work or not
Which file to map in settings etc
pi may not be as easy as Nest as its different.

1) 1st check if AHK works on pi, try to do some basic window code, like say click a button
2) Next, i assume pi orderbook/Order window is functionally same as Nest/NOW ( ie same buttons/columns etc). This is what it seemed to be last time i checked but i didnt compare. If there are differences then code work will increase to workaround those. Most Nest/Now GUI specific code is in Order/*.ahk
3) So now, main work is to identify all control ids, menu options , window titles etc in GUIControls/Now.ahk and override it for pi - say in pi.ahk ( or put them in Nest.ahk for now to make it work automatically and we will shift it later). Use window spy tool to get control ids. You will have to set correct value for almost all constants in NOW.ahk
4) Once this is done, now its trial and error and debug+testing to see if everything is working. For many errors, ahk should simply throw exceptions.

If there is any major code change required, please discuss here first ( if you want to merge code )
 

Snake.Head

Well-Known Member
@TB I will ask him to check that first let you know about it.

Another request is about linking order
Currently if we want to link order have manual put SL and target
So is it possible for eg:
Select long from se;ect entry order window then option to link with SL and Target from main orderman window
so with that it put sl and target order and link with selected entry.
 
Hi ,

I tried with Pi. It is very difficult than NOW/Nest. It has not any ahk /window id for the Order Book. I need to popup the window manually everytime to detect.

The column of the order window has space , not able to detect the column properly.

I can help to develop for pi , if we sort out this initial issue.
 

TracerBullet

Well-Known Member
@TB I will ask him to check that first let you know about it.

Another request is about linking order
Currently if we want to link order have manual put SL and target
So is it possible for eg:
Select long from se;ect entry order window then option to link with SL and Target from main orderman window
so with that it put sl and target order and link with selected entry.
You mean to manually input Stop and target price and then link with entry order ? But whats different if you link with entry order first and then input the prices.

There is a chance to make mistake - you can have old values and forget about it - that is why it gets erased.

Also note, that if Stop and target order are already created, you can link them too. Orderman will autolink on restart if they were created from OM. So manual link is meant to be rarely used.

One scenario where we have issue is if you need to manage two BO orders at the same time and need to input stop after link. This will be fixed once we allow for multiple order management ( but not any time soon ).