SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Sat Jan 22, 2022 11:14 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri May 27, 2016 2:50 am 
Offline

Joined: Thu Sep 17, 2015 5:52 am
Posts: 133
Hi SQ,

Can you please show me how I'd add the following two rules to your SMACrossover example?
Note: I'm looking to do this entirely within the MyStrategy.cs file (rather then doing it via the MyEventFilter.cs file from your SMACrossoverWithEventFilter example.)

Rule 1= Close any open positions at 3pm.
Rule 2= Don't allow any new positions to open between 3pm-6pm.

Thanks


Top
 Profile  
 
PostPosted: Thu Jun 02, 2016 2:58 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 583
Hello M101,
1) Use reminders - example in solution Roll.
2) Use datetime and compare it with datetime of trade/bar/quote to filter your signals.


Top
 Profile  
 
PostPosted: Thu Jun 02, 2016 7:21 pm 
Offline

Joined: Thu Sep 17, 2015 5:52 am
Posts: 133
Great, thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group