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
3 day Low Exit
Collapse
X
-
hi koganam - thanks (i just worked it out due to your post)
need to change ExitLong("", "out-L(p)"); to ExitLong("out-L(p)", "");
cheers - jurgen
-
Originally posted by jurgenC View Posthi all - new to NJ scripting and perplexed with folloiwng
trying to exit any long trades for when the current low is below the lowest low for the previous 3 days - following my script:
if ((Low[0]) <= (MIN(Low, 3)[1]))
{
ExitLong("", "out-L(p)");
}
when i run the script (and print out the necessary numbers), the script enters a Long position, however does not exit as expected on a bar where the low is clearly below the min of the following 3 days low (the printed out numbers suggest that the condition is true, current low below MIN).
the system behaves as expected for any Short trades where i have something similar (current High above max of previous 3 day highs)
any suggestions as to what i am doing wrong is very much appreciated - thanking you in advance; cheers...
...jurgen
Leave a comment:
-
3 day Low Exit
hi all - new to NJ scripting and perplexed with folloiwng
trying to exit any long trades for when the current low is below the lowest low for the previous 3 days - following my script:
if ((Low[0]) <= (MIN(Low, 3)[1]))
{
ExitLong("", "out-L(p)");
}
when i run the script (and print out the necessary numbers), the script enters a Long position, however does not exit as expected on a bar where the low is clearly below the min of the following 3 days low (the printed out numbers suggest that the condition is true, current low below MIN).
the system behaves as expected for any Short trades where i have something similar (current High above max of previous 3 day highs)
any suggestions as to what i am doing wrong is very much appreciated - thanking you in advance; cheers...
...jurgenTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by trilliantrader, Today, 03:01 PM
|
0 responses
2 views
0 likes
|
Last Post Today, 03:01 PM | ||
Started by pechtri, 06-22-2023, 02:31 AM
|
9 responses
122 views
0 likes
|
Last Post Today, 02:31 PM | ||
Started by frankthearm, 04-18-2024, 09:08 AM
|
16 responses
67 views
0 likes
|
Last Post Today, 02:17 PM | ||
Started by habeebft, Today, 01:18 PM
|
1 response
8 views
0 likes
|
Last Post Today, 02:03 PM | ||
Started by benmarkal, Today, 12:52 PM
|
2 responses
19 views
0 likes
|
Last Post
by benmarkal
Today, 02:00 PM
|
Leave a comment: