Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How Do I enter a trade not on the close but LOW???
Collapse
X
-
-
-
The orders would be placed by default on the next bar, so you can just act on your doji entry condition and place a limit order at Low[0] (the last completed bar on CalculateOnBarClose) - http://www.ninjatrader.com/support/h...rlonglimit.htm
That order would stay for one bar only though, if you don't resubmit or set liveUntilCancelled to 'true'.BertrandNinjaTrader Customer Service
Comment
-
I got this so far Where would I put LiveUntilCancelled?
Code:/// <summary> /// This method is used to configure the strategy and is called once before any strategy method is called. /// </summary> protected override void Initialize() { CalculateOnBarClose = true; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { // Condition set 1 if (Open[0] == Close[0]) { EnterLongLimit(DefaultQuantity,Low[0], ""); } }
Comment
-
The liveUntilCancelled property would be set as part of the more advanced overload available for the EnterLongLimit() -
Code:EnterLongLimit(int barsInProgressIndex, [I]bool liveUntilCancelled[/I], int quantity, double limitPrice, string signalName)
BertrandNinjaTrader Customer Service
Comment
-
is this correctCode:protected override void OnBarUpdate() { // Condition set 1 if (Open[0] == Close[0]) { EnterLongLimit(0,true,DefaultQuantity, Low[0], ""); } }
Comment
-
Cool!!! Hey I have one more question to ask. how can I tell ninjatrader to exit the long position after 2 bars. I noticed that when I put profit target of 4 ticks, it thinks all of the candles are profitable....... or should I create a muti time frame that takes the long on the 1 min chart?? which one would work better
Comment
-
Correct, per default it could not look intrabar - that's something we have on our feedback list for the next major update though.
For now a MultiSeries script would be best, sending to 1 min for example for execution and then using the Exit methods for your stop / target, so you could have them deciphered as well on the lower series with added granularity.BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by RideMe, 04-07-2024, 04:54 PM
|
5 responses
28 views
0 likes
|
Last Post Today, 08:48 AM | ||
Started by f.saeidi, Today, 08:13 AM
|
1 response
4 views
0 likes
|
Last Post Today, 08:47 AM | ||
Started by DavidHP, Today, 07:56 AM
|
1 response
6 views
0 likes
|
Last Post Today, 08:16 AM | ||
Started by kujista, Today, 06:23 AM
|
3 responses
9 views
0 likes
|
Last Post
by kujista
Today, 08:15 AM
|
||
Started by Mindset, Yesterday, 02:04 AM
|
2 responses
18 views
0 likes
|
Last Post Today, 08:15 AM |
Comment