Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Question with ninjascript strategy
Collapse
X
-
Question with ninjascript strategy
While making a new ninjascript strategy, in the conditions and actions set section, I set up certain conditions that result in the action of entering a trade as well as setting variable0 = 1. When a position is not open variable0 = 0. I also set up a condition when variable0 == 1 and when the time series 0 bars ago == the time series 96 bars ago, the action taken is closing any open positions. I thought this would result in closing of any open positions after 96 bars have passed. However while backtesting, this does not seem to be the case, as i have one trade that went over 300 bars. How do I go about setting up a condition and action set that results in any open positions being closed after 96 bars?Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rocketman7, Today, 01:00 AM
|
0 responses
1 view
0 likes
|
Last Post
by rocketman7
Today, 01:00 AM
|
||
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
27 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:43 PM
|
||
Started by wzgy0920, 02-22-2024, 01:11 AM
|
5 responses
32 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:33 PM
|
||
Started by wzgy0920, 04-23-2024, 09:53 PM
|
2 responses
74 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:29 PM
|
||
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
193 views
0 likes
|
Last Post
by Hasadafa
Yesterday, 10:19 PM
|
Comment