SmartQuant Discussion
http://www.smartquant.com/forums/

Sequence of instruments in OnBar event
http://www.smartquant.com/forums/viewtopic.php?f=44&t=10193
Page 1 of 1

Author:  bill [ Fri May 25, 2012 6:18 pm ]
Post subject:  Sequence of instruments in OnBar event

Hi,

How can I find out what instruments is treated last in the OnBar event. I need to calculate parts of a portfolio every day.
Example:
DAX +1 contract
US Treasury 2 contracts
S&P -2 contracts

I want to create a trade let's say in Crude oil if I'm net short equity markets. The problem is that I need to be at the end of all markets of the day in order to make that decision.
In OnStrategyStop event the sequence of markets is given by the instruments added to the strategy. However when placing a sell order in that event, nothing really happen.

Any ideas anybody? Thank you!

Bill

Author:  Dr. Anton Fokin [ Fri May 25, 2012 7:02 pm ]
Post subject:  Re: Sequence of instruments in OnBar event

Hi,

I suggest you take a look at OnBarSlice event, which is fired after all OnBars for all instruments.

Regards,
Anton

Page 1 of 1 All times are UTC + 3 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/