Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Cannot add period to strategy
Collapse
X
-
Cannot add period to strategy
I have a strategy coded that works on a certain timeframe. In order to back-test it properly, I would like to be able to run the strategy on 1 minute or tick bars, while still taking the trades as they would be taken on the higher timeframe. I have managed to do this with one of my systems, but the other system just won't work with it. When I had Add(PeriodType.Minute, 10), the system just does not work anymore at all. I added a code to write text to the chart on every bar, just to see if the strategy is even running, and they text does not come up. If I take away the Add(PeriodType.Minute, 10), things work again. Is it something in my code that I am missing?Tags: None
-
Ah ty, I was using BarsSinceEntry() in the strategy which cannot be used in Multi timeframe strategies. Now the problem is that I get an entry, and the strategy says the the profit target was filled in that bar when it was not filled in that bar.
For example, I get a short entry filled at 1271.00, and the profit target is 1269.5, and the low of the entry bar is 1270.25. The strategy shows on the chart the profit was given on that bar :/
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
576 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment