Enter at 10am instead of market open in a daily strategy
Author: eralbanese
Creation Date: 1/13/2021 5:03 AM
profile picture

eralbanese

#1
I have a few strategies that are evaluated on a daily bar basis but I want to enter buy/sell the trade at market at 10am instead of market open. Is this possible?
profile picture

Eugene

#2
profile picture

eralbanese

#3
Thanks, I've tried coding it and all I receive back is a Monte Carlo Error " Object Reference not set to an instance of an object". I am using the 30 min charts from Alpha
profile picture

Eugene

#4
Okay, "you have a few strategies" where you "tried coding it" and it (apparently your call to GetTime?) produces an error. Very informative! :)

Try to follow the several examples for GetTime in the Wiki precisely and it should work. Given that you've switched to 30-min charts this is the best advice since everything is unknown.
profile picture

eralbanese

#5
CODE:
Please log in to see this code.


Sorry, I will be more specific. This was run on a 30-min watchlist to try and buy at 10am and to just sell after a few days as a test.
profile picture

Eugene

#6
That's incomplete, broken code where you've inserted different parts at random. Maybe it helps if you show us the real code to add GetTime to?
profile picture

eralbanese

#7
Eugene, even the supplied code for intraday runners is failing on me.

CODE:
Please log in to see this code.



I've tried to run this on every intraday timeframe with alpha data (api enabled) with the same results. " Object Reference not set to an instance of an object"



profile picture

Eugene

#8
Hmm that must be some code from here: Breakout from first hour's high or low (intraday setup)

The code is fine, try this Wiki article for suggestions:

Errors | Strategy > (at the bottom) Object reference not set to an instance of an object
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).