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
Time entry
Collapse
X
-
Hello JTizz,
Thank you for your post.
I'm unfamiliar with this pariticular indicator and am unsure if it has exposed plots that give a particular time that could be compared with a DateTime in the Strategy Builder. I would advise reaching out to the folks at Ninza.co as it appears they're the ones that developed this particular indicator, as they would be most familiar with the code and whether or not it supplies plots that can be used with the Strategy Builder.
Please let us know if we may be of further assistance to you.Kate W.NinjaTrader Customer Service
Comment
-
Her is Ninza's reply:
You can rely on the Signal_Times below to build your own strategy.- Signal_Time1: 1 = during trading time, 0 = out of trading time
- Signal_Time2: 1 = during trading time, 0 = out of trading time
- Signal_Time3: 1 = during trading time, 0 = out of trading time
Comment
-
Hello JTizz,
Thank you for your reply.
From their response it looks like you can't compare the current time - the indicator simply returns a value of 1 if the current time is within trading time and 0 if it is not. So, what you'd want to do would be dependent on whether you just want to take a single trade during a trading time period as defined by the indicator properties, or if you want the strategy to be able to continuously trade if the initial trade is exited before that trading period is over.
If you just want it to limit the trades to the defined trading periods, you could just add a condition to your entries for the signal times:
if (SignalTime1 ==1)
{
//first signal time entry logic goes here
}
if (SignalTime2 == 1)
{
// second signal time entry logic goes here
}
if (SignalTime3 == 1)
{
// third signal time entry logic goes here
}
If you want it to only take one trade at the beginning of each signal time period, you could use a bool for each period - for example, create a Bool called Signal1Entered and set it to false, then when you enter the first time for the first signal period, check whether it is false before entering, then set it to true after the entry is made. Then, once SignalTime1 == 0 again, set it back to false for the next day's entry at that time.
Please let us know if we may be of further assistance to you.
Kate W.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Perr0Grande, Today, 08:16 PM
|
0 responses
2 views
0 likes
|
Last Post
by Perr0Grande
Today, 08:16 PM
|
||
Started by elderan, Today, 08:03 PM
|
0 responses
5 views
0 likes
|
Last Post
by elderan
Today, 08:03 PM
|
||
Started by algospoke, Today, 06:40 PM
|
0 responses
10 views
0 likes
|
Last Post
by algospoke
Today, 06:40 PM
|
||
Started by maybeimnotrader, Today, 05:46 PM
|
0 responses
11 views
0 likes
|
Last Post Today, 05:46 PM | ||
Started by quantismo, Today, 05:13 PM
|
0 responses
7 views
0 likes
|
Last Post
by quantismo
Today, 05:13 PM
|
Comment