Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
multiple time frames in strategy. traded out of timeframe
Collapse
X
-
multiple time frames in strategy. traded out of timeframe
i have multiple timeframes in my strategy. i have a timefortrade bool for the timeframes. set to false. when in the timeframe its set to true. then i have in my entry conditions timefortrade equals true. but for some reason the strategy executed out of the timeframe. and, it was right when i enabled it. the entry methods weren't even present.Tags: None
-
Hello SteveReiza,
Thank you for your post.
What do you mean by the statement "the entry methods weren't even present?"
What was the time of the execution when you enabled the strategy? What was the name of the order?
Ultimately, you will need to utilize debugging tools such as TraceOrders and Print statements to understand this behavior and identify what parts of your strategy might need to be corrected. We have information about Trace Orders, which may be enabled on the "Default Properties" screen of the Strategy Builder, as well as a link to a video about adding prints in the builder on the following page:
Since you are using multiple timeframes, I also suggest reviewing the following help guide page about multi-time frame scripts:
You could add print statements to Set 1 that show the bar timestamps for each timeframe used when TimeForTrade is set to true. Another thing to consider is, when are you resetting TimeForTrade back to false? You must have a set that checks for the opposite and when it is outside the desired timeframe to set TimeForTrade back to false, otherwise it will stay set to true after the first time it is toggled to true and this could be the culprit that resulted in a trade being taken as soon as you enabled the strategy.
Please let us know if we may be of further assistance.Emily C.NinjaTrader Customer Service
-
thanks for the reply. i mean i was looking at the chart, and i couldn't see the entry method in the strategy. but, i found the problem. in the set, 'any' was selected. so, soon as i enabled it executed because one of many conditions were true.
okay sweet. i can print just one set - good to know! i do have timeframe set to re-read it back to false. i think i solved the problem by selecting 'all' in that one set.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by pibrew, Today, 06:37 AM
|
0 responses
4 views
0 likes
|
Last Post
by pibrew
Today, 06:37 AM
|
||
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
14 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
11 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
16 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
Comment