Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Close position - Multiple events
Collapse
X
-
Two separate sets. The code will evaluate the first one first. Then it will evaluate the second.
-
Close position - Multiple events
Please excuse a newbie question: I am trying to close a position based on one of either of two events occurring. How do I code this?
// Condition set 2
if (CrossBelow(LinRegSlope(8).LRSlope, MyInput0, 1))
{
ExitLong("", "");
}
2nd event to possibly occur would be:
if (CrossBelow(Typical, CalculateValueArea(false, 8, 30, 0.7, "VWTPO", 6.75).VAt, 1)
If either event occurs, I would like the long position to be closed. No further orders should be placed other than to close the position. Should this be in the same condition set or a new condition? A little confused right now. If someone could show how to do the code, it would be greatly appreciated. Thanks in advance!Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by elirion, Today, 01:36 AM
|
2 responses
12 views
0 likes
|
Last Post
by elirion
Today, 07:21 AM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
5 responses
14 views
0 likes
|
Last Post Today, 07:18 AM | ||
Started by samish18, Yesterday, 08:31 AM
|
4 responses
14 views
0 likes
|
Last Post
by elirion
Today, 07:15 AM
|
||
Started by funk10101, Yesterday, 09:43 PM
|
1 response
14 views
0 likes
|
Last Post Today, 07:07 AM | ||
Started by TheWhiteDragon, 01-21-2019, 12:44 PM
|
5 responses
551 views
0 likes
|
Last Post Today, 07:05 AM |
Leave a comment: