Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Problem with trade signal
Collapse
X
-
THANK YOU jOSH, THIS SEEMS TO HAVE WORKED, BUT I WILL KNOW BETTER TOMORROW DURING MARKET HOURS.
nOW, i WANT TO DO SOMETHING ELSE WHICH FOR YOU IS PERHAPS SIMPLE. wITHIN ONE STRATEGY i WANT TO SET TWO DIFFERENT VOLUME CONDITIONS BASED ON TIME.
Condition is:
Between the hours of 9:35 to 16:00 EST I want MAX{VOL(), 3,(0)} > 1000000
Between 16:01 to 9:25 I want the volume in above 100000.
Thanks for the help.
Comment
-
Add yourself three conditions for each one.
1. First one you want to select Time Series on the left and on the right you want to select Time value. Type in the start time and in the middle select >=.
2. Add another Time Series left with Time value right condition. In the middle select <=. Type in your end time.
3. Add your MAX() on Volume condition
Repeat in another set for your second case.Josh P.NinjaTrader Customer Service
Comment
-
Not working
Good Morning Josh,
The Time based stuff is not working. This is what I have added in the conditions in each set:
ToTime(Time[0]) > ToTime(8,35,0)
ToTime(Time[0]) <ToTimt(14,55,0)
This represents the time frame of 8:35 AM to 2.55 PM.
Only thing in the other sets i have is time (15,5,0) or (8,25,0)
The strategy with these time parameters does not work, if i remove the time additions only then it works fine.
So, what is wrong with what i have done? Thanks.
Comment
-
If you add a time filter it will not trade unless conditions are evaluated to true within those specific time periods. You can't expect it to do the same trades as it would without the filter.
Going from 3:05PM to AM the next day is not doable from the Strategy Wizard.Josh P.NinjaTrader Customer Service
Comment
-
Yes, i understand that. he conditions are met without the time filter and with filter but the strategy when applied without the time triggers trades / signals at the appropriate condition levels but with the time it does not. So, there must be something wrong withthe time settings.
Comment
-
Post a screenshot of exactly what you have. If you cannot make screenshots just post the strategy. Again, your strategy will ONLY execute when ALL conditions for the set are true at the same time. Sorry if I keep hammering this point because computers do not lie so you will need to check your conditions for true again.Josh P.NinjaTrader Customer Service
Comment
-
Thank you Josh, Yes, true that "all conditions in the strategy must be met" True. What i have done is made two versions of the same strategy. One has all the conditions including the time things as I showed in my earlier communication. I run this strategy. No signals whatsoever. Then I removed "only the time things" from this and saved it under a different name. Running this produces all the expected signals.
So it must be the way the time thing is formatted. But you are saying there is nothing wrong with those time parameters. Right? So any other thoughts. Thanks.
Comment
-
Yesterday you advised:
Essentially you will need two Sets then. In Set 1 you want to remove BarsSinceEntry() from the conditions. Instead you want to add a condition that says Variable0 == 0. In the actions you want to add one that sets Variable0 = 1. You can find Variable0 under the "User defined variables" category.
Now in Set 2, you want to copy what you had in Set 1. This time remove the Variable0 from both the condition and action halves. In the condition add the BarsSinceEntry() > 0.
This works great for the 2nd contract but not later. The first contract is filled on first bar and then it waits but remaining 4 are filled on the next bar.
Here is what i am trying to accomplish: i have the # of contracts in one direction set at 5. I want the 1st contract to be traded with the first signal. 2nd contract should wait till the next signal in the same direction and third till next and so on.
Thanks.
Comment
-
ju1234,
Then just prevent it from triggering. Variable0 for condition 1. Variable1 for condition 2.
Only trade Set 1 when Variable0 = 0. After you trade condition 1, set Variable0 = 1.
Only trade Set 2 when Variable1 = 0 AND Variable0 = 1 AND BarsSinceEntry() > 0. After you trade condition 2, set Variable1 = 1.
Only trade Set 3 when Variable2 = 0 AND Variable1 = 1 AND Variable0 = 1 AND BarsSinceEntry() > 0. After you trade condition 3, set Variable2 = 1.
Repeat for Set 4.
After you exit your trades you will need to reset Variable0-4 back to 0 to reallow for trading again.Josh P.NinjaTrader Customer Service
Comment
-
I did not quite get this. Is this an instruction to me to only trade set one and then change settings or is that the language of the condition in the condition builder. Can you please put the language that needs to be inserted in the condition builder in quotes. Thanks.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
580 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
335 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
102 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment