Thanks!!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Only trade during the DayTime
Collapse
X
-
Try
Set 'EntriesPerDirection' to 1 (single trade) ,if using strategy builder.
https://ninjatrader.com/support/helpGuides/nt8/en-us/?using_a_time_filter_to_limit_t.htm
session iterator(); A whole list to choose from
OrderTypes() nt8. it depends on what type of trade you want use for the strategy. market order, limit, .....
TradeCollection()
protected override void OnBarUpdate()
{
// Print out the number of long trades
Print("The strategy has taken " + SystemPerformance.AllTrades.Count + " trades.");
}
Enterlong()
Example ,EnterLong(int quantity)
rotected override void OnBarUpdate()
{
if (CurrentBar < 20)
return;
// Only enter if at least 10 bars has passed since our last entry
if ((BarsSinceEntryExecution() > 10 || BarsSinceEntryExecution() == -1) && CrossAbove(SMA(10), SMA(20), 1))
EnterLong(5, "SMA Cross Entry");
}Last edited by Emma1; 12-25-2018, 08:02 AM.
-
Hello r3n3v,
Thanks for your post.
You can control your strategy timing by using a time filter. The time filter provides an entry condition that basically says the time must be between this time and that time, that you specify.
If you are coding directly in Ninjascript, here is a link to a working example: https://ninjatrader.com/support/help...to_limit_t.htm
If you are using the strategy builder then you can check the help guide example, "How to create time filters" https://ninjatrader.com/support/help...on_builder.htm
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
236 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
151 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
162 views
1 like
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
243 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
198 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment