OrderMan - Ordering interface for NOW + Amibroker

TracerBullet

Well-Known Member
#51
//if( this.positionSize == 0 ) // Keep Target order pending until we have Entered a position
// return
No that is correct, Target order should not be created untill we have a position open ( ie only after entry order is filled ).

In trackerCallback(), this is set by below
Code:
[B]this.positionSize += this.newEntryOrder.getOrderDetails().totalQty[/B]
this.executedEntryOrderList.Push( this.newEntryOrder )
this._handleTargetOrder( this.targetOrder.getPrice() )
Anyway, i have access to Nest account from Snakehead - so i should be able to test it this week.

Also NT interface is not yet written, ill do it later. Should be simple - similar to AB. Also NT gives handy tooltip on middle click which can be easy backup to get price.
 

boarders

Well-Known Member
#53
No that is correct, Target order should not be created untill we have a position open ( ie only after entry order is filled ).

In trackerCallback(), this is set by below
Code:
[B]this.positionSize += this.newEntryOrder.getOrderDetails().totalQty[/B]
this.executedEntryOrderList.Push( this.newEntryOrder )
this._handleTargetOrder( this.targetOrder.getPrice() )
Anyway, i have access to Nest account from Snakehead - so i should be able to test it this week.

Also NT interface is not yet written, ill do it later. Should be simple - similar to AB. Also NT gives handy tooltip on middle click which can be easy backup to get price.
thought that entry in _handletarget order was unnecessary as we have the same condition while calling it in the following:
trackerCallback(){

if( this.newEntryOrder.isClosed() ){ // Entry Finished

if( this.isEntrySuccessful() ){


so commented out after which I have already taken live 1 long and 1 short call and in both cases it placed both stop and target calls and also cancelled the other when one got executed. all working normally.
 

TracerBullet

Well-Known Member
#54
thought that entry in _handletarget order was unnecessary as we have the same condition while calling it in the following:
trackerCallback(){

if( this.newEntryOrder.isClosed() ){ // Entry Finished

if( this.isEntrySuccessful() ){


so commented out after which I have already taken live 1 long and 1 short call and in both cases it placed both stop and target calls and also cancelled the other when one got executed. all working normally.
That function is called in multiple scenarios, i do not remember exact reason but having tests in code is good practise anyway. If position size variable is 0 then there can be problem whereever its used. Yet i also see position size as 1 in status bar ( taken from same variable ). You can continue for now, but we will have to check why its 0 - it should be set by earlier line i gave.
 

boarders

Well-Known Member
#55
For testing purpose I hve reverted back to the original version for target price and placed an entry order which is waiting to execute. at this time orderman shows O-TP(1) and P(1) but doesnt show anything near target. could this be related to target not being placed???


 

TracerBullet

Well-Known Member
#56
For testing purpose I hve reverted back to the original version for target price and placed an entry order which is waiting to execute. at this time orderman shows O-TP(1) and P(1) but doesnt show anything near target. could this be related to target not being placed???


Yes, it should show pending. This means your target order is not set from start itself. Normally we set up target parameters.

When you create entry order, debug _handleTargetOrder() and see why it returns early. It will become pending if below line is run properly

Code:
this.targetOrder.setOrderInput( ORDER_TYPE_GUI_LIMIT, _stopDirection, this.positionSize, targetPrice, 0, _prodType, this.scrip )
Edit - Wait, it may be a recent bug. Ill fix it along with Nest stuff. Bug happens when position size is 0 - Only effect should be lack of GUI status update.
But Still, Target order should be created on entry trigger when positionSize is not 0.
 
Last edited:

boarders

Well-Known Member
#57
what i have observed with the original target order settings:

when entry order executes stop order is placed automatically but target order does not get placed.

now if we close orderman and open again and set target from zero and click update, then target order gets placed.
 

TracerBullet

Well-Known Member
#58
what i have observed with the original target order settings:

when entry order executes stop order is placed automatically but target order does not get placed.

now if we close orderman and open again and set target from zero and click update, then target order gets placed.
There were couple of bugs with target order - one prevents GUI update initially and one removes target order after linking. Its not same as your problem though. Will check on Nest later.

This is an updated build with very initial Nest support. Its not tested on Nest, i am still logged in to NOW. Will test it in evening but since market are open now, you might try it. If it does not work from start then leave it, else try your scenarios. It has some fixes for target order. I took one trade just now on it with entry and stop and atleast that worked in NOW.

In this build i have put (hopefully) all GUI related strings and control names in separate file which can be overriden for Nest (GUIControls\Nest.ahk). Make sure to set Server = Nest and set correct WindowTitle in config.
 

boarders

Well-Known Member
#59
There were couple of bugs with target order - one prevents GUI update initially and one removes target order after linking. Its not same as your problem though. Will check on Nest later.

This is an updated build with very initial Nest support. Its not tested on Nest, i am still logged in to NOW. Will test it in evening but since market are open now, you might try it. If it does not work from start then leave it, else try your scenarios. It has some fixes for target order. I took one trade just now on it with entry and stop and atleast that worked in NOW.

In this build i have put (hopefully) all GUI related strings and control names in separate file which can be overriden for Nest (GUIControls\Nest.ahk). Make sure to set Server = Nest and set correct WindowTitle in config.
will try out and revert thanks