Netting on ELS stop orders

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

Netting on ELS stop orders

Postby tllewell » Thu Mar 14, 2013 10:39 am

I am writing strategies in a US FIFO account, so I use ELS stops when my strategies enter new positions.

Can I add valuemap.NetQytFlag = "y" under the ELS flag to make this a "netting" stop order? Or is there another way to do this?
tllewell
 
Posts: 76
Joined: Thu Mar 01, 2012 4:06 pm

Re: Netting on ELS stop orders

Postby tllewell » Thu Mar 14, 2013 8:27 pm

So the NetQtyFlag setting doesn't seem to work. When run the stop that gets created doesn't display as a Net Stop and says it's just a stop. I can't find a comprehensive list of the valuemap options on the docs or here. Is there a way for Indicore to do this?

Maybe I'll just collect all the stops around the same price point.
tllewell
 
Posts: 76
Joined: Thu Mar 01, 2012 4:06 pm

Re: Netting on ELS stop orders

Postby Victor.Tereschenko » Fri Mar 15, 2013 5:41 am

Check out this sample. It creates netting entry stop and netting entry limit joined into OCO.
Attachments
netting_test.lua
(2.85 KiB) Downloaded 724 times
“There are only three sports: bullfighting, motor racing, and mountaineering; all the rest are merely games.” (c) Ernest Hemingway
Victor.Tereschenko
FXCodeBase: Confirmed User
 
Posts: 144
Joined: Fri Nov 19, 2010 8:55 am

Re: Netting on ELS stop orders

Postby tllewell » Fri Mar 15, 2013 7:33 am

Thanks for the example.

I don't understand the usage here. In the docs, NetQtyFlag is a boolean, whereas in your example it is used:

valuemap.NetQtyFlag = netQuantity;

Is this the netQuantity from the Orders table? Yes, I have problems with the documentation (I found where the valuemaps are), but what am I missing here?
tllewell
 
Posts: 76
Joined: Thu Mar 01, 2012 4:06 pm

Re: Netting on ELS stop orders

Postby Victor.Tereschenko » Tue Mar 19, 2013 4:54 am

tllewell wrote:Thanks for the example.

I don't understand the usage here. In the docs, NetQtyFlag is a boolean, whereas in your example it is used:

valuemap.NetQtyFlag = netQuantity;

Is this the netQuantity from the Orders table? Yes, I have problems with the documentation (I found where the valuemaps are), but what am I missing here?

NetQtyFlag is a string type:
http://www.fxcodebase.com/documents/Ind ... er_SE.html
NetQtyFlag
string
The net quantity flag. The value can be either y or n. The value is optional. The default value is n.
“There are only three sports: bullfighting, motor racing, and mountaineering; all the rest are merely games.” (c) Ernest Hemingway
Victor.Tereschenko
FXCodeBase: Confirmed User
 
Posts: 144
Joined: Fri Nov 19, 2010 8:55 am

Re: Netting on ELS stop orders

Postby tllewell » Sun Apr 07, 2013 7:18 pm

OK, I have the net stop code figured out. Now I have another problem. There is no way to detect if there is a net stop in place. Although the Summary table in TS shows the net stop, there is no corresponding entry in the Summary table available rows in the docs for Indicore. I have a boolean I set so I don't create a net stop twice, but it only works as long as the strategy runs. If I exit the strategy and start it again later, it has no way of knowing that a net stop is already in place.

So, is there a way to do this? I need a row.NetStop or similar in a table. Can this be added?
tllewell
 
Posts: 76
Joined: Thu Mar 01, 2012 4:06 pm

Re: Netting on ELS stop orders

Postby sunshine » Mon Apr 08, 2013 4:53 am

Please refer to the Orders table in the SDK documentation:
http://www.fxcodebase.com/documents/Ind ... rders.html
Indicore SDK documentaion wrote:NetQuantity

Boolean

For SE/LE orders (see Orders.Type column), defines whether the order is Net stop/limit or regular stop/limit. For open market orders, defines whether the order is "Close All by Instrument" or a regular open market order.

I hope it helps.
sunshine
 

Re: Netting on ELS stop orders

Postby tllewell » Wed Apr 10, 2013 9:19 am

Yes, I think that works. Good catch, Sunshine, thanks!
tllewell
 
Posts: 76
Joined: Thu Mar 01, 2012 4:06 pm


Return to Discussions

Who is online

Users browsing this forum: No registered users and 13 guests