OrderMan - Ordering interface for NOW + Amibroker

josh1

Well-Known Member
Thats good. 0 is much better than adding slippage settings. Rest we will see in testing. Good to get familiar with part of code flow.

Do two more changes when free and then send merge to me.
1) Add Setting to choose between SLM and SL ordertype in OrderMan.ini, then read it in Settings.ahk and set STOP_ORDER_TYPE to ORDER_TYPE_GUI_SL_MARKET/ORDER_TYPE_GUI_SL_LIMIT.
2) Your Comments - no need to add date - just say setting 0 as Limit price to simulate SLM order.

Also, In git make sure you merge only changes that you did. I use "git gui" command to do the manual merge. github desktop seems to be inverse, need to select what not to merge. See partial commit here. So make sure only your changes are merged to commit and then send it to me. thanks

Na, i doubt that. Never seen such thing yet. Anyway, Orderman has some lag too so should be ok. For normal day trading 3m /1m and up should be no problem. No idea about scalping. This is same as setting stop price in bracket orders ( except bracket orders will be faster as they dont have to automate GUI)
Done. This time I did changes directly in Github. So you have pull requests.
I didn't enter any 0. Your original code had 0 hard coded for price.
 
Last edited:

TracerBullet

Well-Known Member
Well, some times NOW complains "Enter Proper Price" when Stop is to be updated. Original Stop order is accepted
Try to debug using scite. Put breakpoints in update flow.

See Order.ahk : update() which calls Order.ahk : _submitOrderCommon(). Then you can inspect and check whats getting filled and figure out whats wrong. I hope its not complaining because of price 0 with SL order. Double check this first - does NOW accept SL Limit order update with price 0?

Just for reference update goes from GuiActions.ahk : onUpdate() to Trade.ahk : update() which then calls Order.ahk : update() for each individual order.
 

josh1

Well-Known Member
Try to debug using scite. Put breakpoints in update flow.

See Order.ahk : update() which calls Order.ahk : _submitOrderCommon(). Then you can inspect and check whats getting filled and figure out whats wrong. I hope its not complaining because of price 0 with SL order. Double check this first - does NOW accept SL Limit order update with price 0?

Just for reference update goes from GuiActions.ahk : onUpdate() to Trade.ahk : update() which then calls Order.ahk : update() for each individual order.
Double check this first - does NOW accept SL Limit order update with price 0? Yes it does, I placed it directly lot of times.

May be next time it happens I will figure out. Order window pops up immediately so it is not dangerous.
 

TracerBullet

Well-Known Member
Double check this first - does NOW accept SL Limit order update with price 0? Yes it does, I placed it directly lot of times.

May be next time it happens I will figure out. Order window pops up immediately so it is not dangerous.
ok good that we can keep 0 + SL-Limit. Debug through scite next time ( will have to run orderman through scite) and check. There must be some field that is not getting set properly with this Stop ordertype change, or, something different with Achiever's NOW. I haven't seen this error yet.

If Order Window remains open after error, then check if something is set incorrectly. Do you need to do anything more to submit that order?
 

josh1

Well-Known Member
There it is.


Original Stop was at 524.9. Entry made at 525.15 with 'Limit' Order. Stop Order created immediately. It was SL-M (Trigger at 524.9 and Price 0). I changed stop to 525.5 immediately and clicked 'Update'. NOW complained. See, the order is 'Limit' instead of 'SL'.

We have to figure out why Stop order changed to 'Limit'. It should always be 'SL' or 'SL-M'

Edit:- This is a problem in case of trailing SL. Some of my trades were prematurely closed earlier because I entered price without noticing order type and clicked on Submit. The trades were executed immediately.
 
Last edited: