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 f.saeidi, Today, 11:02 AM
|
1 response
1 view
0 likes
|
Last Post Today, 11:08 AM | ||
Started by geotrades1, Today, 10:02 AM
|
4 responses
12 views
0 likes
|
Last Post
by geotrades1
Today, 11:08 AM
|
||
Started by rajendrasubedi2023, Today, 09:50 AM
|
3 responses
15 views
0 likes
|
Last Post Today, 10:57 AM | ||
Started by lorem, Today, 09:18 AM
|
2 responses
11 views
0 likes
|
Last Post Today, 10:55 AM | ||
Started by geddyisodin, Today, 05:20 AM
|
4 responses
30 views
0 likes
|
Last Post
by geddyisodin
Today, 10:45 AM
|
Comment