OrderMan - Ordering interface for NOW + Amibroker

TracerBullet,
I have one request for you. At this moment, the SL order for exit (not for entry) is always SL-M order. This is OK for NFO. But in MCX (particularly in SAS) there is no provision for SL-M order at all. So, when submit button is clicked by OrderMan (while placing SL order for exit) another window pops up saying 'Trigger Price cannot be greater than Limit Price'. In that case we have to manually change the Limit Price.

All this problem is arising because there is NO provision for SL-M order in MCX.

Hence, my request is to add an option for placing SL order (instead of SL-M) while exiting.

I hope you understood what I said :)

Thanks

AND PLEASE KEEP WORKING FOR PARTIAL EXITS. Partial exits are VERY important for many of us.
 

TracerBullet

Well-Known Member
TracerBullet,
I have one request for you. At this moment, the SL order for exit (not for entry) is always SL-M order. This is OK for NFO. But in MCX (particularly in SAS) there is no provision for SL-M order at all. So, when submit button is clicked by OrderMan (while placing SL order for exit) another window pops up saying 'Trigger Price cannot be greater than Limit Price'. In that case we have to manually change the Limit Price.

All this problem is arising because there is NO provision for SL-M order in MCX.

Hence, my request is to add an option for placing SL order (instead of SL-M) while exiting.

I hope you understood what I said :)

Thanks

AND PLEASE KEEP WORKING FOR PARTIAL EXITS. Partial exits are VERY important for many of us.
1) SH said SLM gets enabled if you mail SASOnline ( not sure about MCX)
2) As a workaround for now, Go to GuiActions.ahk : onNew() and replace
Code:
trade.create( selectedScrip, EntryOrderType, "SLM", Direction, Qty, ProdType, EntryPrice, StopPrice, TargetPrice )
with
Code:
trade.create( selectedScrip, EntryOrderType, [B]"SL"[/B], Direction, Qty, ProdType, EntryPrice, StopPrice, TargetPrice )
This should create stop order as SL-Limit. Please test it.
Also Make sure your MaxSlippage for each scrip is set to a very large number so that there is no slippage in stops.
Once confirmed that there is no SLM possible in MCX, i can later add option to set SL-L + separate configurable max slippage for stops.
 

josh1

Well-Known Member
Downloaded the script.
Downloaded AHK latest build and installed.
Script complained column Order Type not present in spite of it being present.
Tried with AHK supplied with the script. It gave some odd GUI error though window opened.
So uninstalled AHK and installed 32 bit AHK in C:\AHK.
Script coplained about trigger column. Added required columns and it opened and sat down in the task bar. The GUI refused to come out from there. It could only be maximised but no resize.

Ultimately, changed this line in Gui.ahk
Gui, 1:Show, AutoSize NoActivate %LastWindowPosition%
to
Gui, 1:Show, AutoSize NoActivate X100 Y40 //; %LastWindowPosition%

It is opening now

Edit - I received the ini files without CRLF. It is difficult to make out what it is.
 
Last edited:

Snake.Head

Well-Known Member
Downloaded the script.
Downloaded AHK latest build and installed.
Script complained column Order Type not present in spite of it being present.
Tried with AHK supplied with the script. It gave some odd GUI error though window opened.
So uninstalled AHK and installed 32 bit AHK in C:\AHK.
Script coplained about trigger column. Added required columns and it opened and sat down in the task bar. The GUI refused to come out from there. It could only be maximised but no resize.

Ultimately, changed this line in Gui.ahk
Gui, 1:Show, AutoSize NoActivate %LastWindowPosition%
to
Gui, 1:Show, AutoSize NoActivate X100 Y40 //; %LastWindowPosition%

It is opening now

Edit - I received the ini files without CRLF. It is difficult to make out what it is.
Make sure nest and ami is not c drive and not run has admin mode...
I will send you my orderman folder you see eg of ini in that
 

josh1

Well-Known Member
Make sure nest and ami is not c drive and not run has admin mode...
I will send you my orderman folder you see eg of ini in that
They are in C but not administrator mode. I could not find where Lastwindow position is defined
 

TracerBullet

Well-Known Member
The GUI refused to come out from there. It could only be maximised but no resize.

Ultimately, changed this line in Gui.ahk
Gui, 1:Show, AutoSize NoActivate %LastWindowPosition%
to
Gui, 1:Show, AutoSize NoActivate X100 Y40 //; %LastWindowPosition%

It is opening now

Edit - I received the ini files without CRLF. It is difficult to make out what it is.
If this gets resolved, try to reproduce problem again - What is the value of LastWindowPosition in Orderman.ini when you get the issue. This value is autogenerated and is supposed to be blank in git upload but i guess i put some value in it in some commit. Will remove it next commit and move to separate ini which should resolve issue, but i dont think it should cause issue as it seems to be in range even for 1024*768 resolution - yet SH also had this, so there may be a bug somewhere.

Where did you download OM from ? Try taking from github
 

josh1

Well-Known Member
If this gets resolved, try to reproduce problem again - What is the value of LastWindowPosition in Orderman.ini when you get the issue. This value is autogenerated and is supposed to be blank in git upload but i guess i put some value in it in some commit. Will remove it next commit and move to separate ini which should resolve issue, but i dont think it should cause issue as it seems to be in range even for 1024*768 resolution - yet SH also had this, so there may be a bug somewhere.

Where did you download OM from ? Try taking from github

Value was 1006 for X. I changed it to 400 and window became visible.
OM was from zip. (Old). Now I is from git.
 

TracerBullet

Well-Known Member
I dont understand, why did you need to change code?
Does this not work (XX removed). Please try it with only type and symbol order reversed (so that it works with options) and without above change
No, it doesn't work that way. In fact, in my CrudeOil-Scrip.ini file, i had never put 'XX' as type, it was left empty from the very beginning.
CRUDE -

So i tested this, it is working. I assume you forgot to remove your changes.
This is the scrip
Scrip = MCX,FUTCOM,CRUDEOILM,,,1
This is the function code
Code:
	/*	Fill up Buy/Sell Window and Submit
	*/
	_submitOrder( winTitle ){												// Fill up opened Buy/Sell window and verify
		
		global controlObj

		scrip     := this._input.scrip
		ordertype := this.getNowOrderType()
		
		Control, ChooseString , % scrip.segment,     	% controlObj.ORDER_ENTRY_EXCHANGE_SEGMENT,  %winTitle%			// Exchange Segment - NFO/NSE etc
		Control, ChooseString , % scrip.instrument,  	% controlObj.ORDER_ENTRY_INST_NAME,  		%winTitle%			// Inst Name - FUTIDX / EQ  etc
		Control, ChooseString , % scrip.symbol, 	 	% controlObj.ORDER_ENTRY_SYMBOL,  		 	%winTitle%			// Scrip Symbol

		if( scrip.type != "" )
			Control, ChooseString , % scrip.type,  	 	% controlObj.ORDER_ENTRY_TYPE,  			%winTitle%			// Type - XX/PE/CE
		Control, ChooseString , % scrip.strikePrice, 	% controlObj.ORDER_ENTRY_STRIKE_PRICE,  	%winTitle%			// Strike Price for options
		Control, Choose		  , % scrip.expiryIndex, 	% controlObj.ORDER_ENTRY_EXPIRY_DATE,  	 	%winTitle%			// Expiry Date - Set by Position Index (1/2 etc)
		
		Control, ChooseString , % ordertype, 		 	% controlObj.ORDER_ENTRY_ORDER_TYPE,  		%winTitle%			// Order Type - LIMIT/MARKET/SL/SL-M		
		Control, ChooseString , % this._input.prodType, % controlObj.ORDER_ENTRY_PROD_TYPE,    		%winTitle%			// Prod Type - MIS/NRML/CNC
		Control, ChooseString , DAY, 	   			 	% controlObj.ORDER_ENTRY_VALIDITY, 			%winTitle%			// Validity - Day/IOC

		this._submitOrderCommon( winTitle )
	}
If you still get issue with crude, zip your orderman folder and upload.

OPTION -
I used below scrip
Scrip = NFO,OPTIDX,NIFTY,PE,7900.00,1
Form Filling is ok, but there is an error in background "Exchange or Series or Symbol is not selected". This is a broker specific bug, this does not happen in NOW. You can open Buy/Sell window and select NFO - gives same error. Also gives error if you select NFO in marketwatch. This seems to happen because they have an empty string option in symbol - NOW doesnt have it.

I would prefer to keep broker specific code to minimum, try to resolve it with them. Else we can put simple workaround code to click on ok after order is submitted. We can detect window using text ""Exchange or Series or Symbol is not selected" and click on button with id "Button1" on it.

Does this happen with NEST other than SASOnline - Please check