Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy indicator
Collapse
X
-
Strategy indicator
I have a strategy I created from a strategy I have on think or swim but the strategy on ninja trader kicks in a bar after the one on think or swim. I am trying to plot an indicator on ninja trader when the strategy is true to compare it to think or swim but the draw function I added to the strategy is not working. I am using strategy builder and on the "conditions and actions" screen I add a draw function for arrow down. When I run the strategy on the chart it shows the trade execution arrow but not the arrow to show when the strategy was true. How can I add that correctly?Tags: None
-
Hello lbolton64,
NinjaScript strategies by default will execute OnBarClose which may explain the difference from the chart you are comparing it against. You can try running the strategy in realtime with its Calculate set to OnPriceChange or OnEachTick to see if that allows it to line up.
For the drawing object, make sure you have AutoScale checked and also for the Y price make sure you use a price that would be in the visible range of the chart. You can select a series like the High or Low series and offset it a number of ticks away. If you want to draw multiple objects over time you also need to use a tag that includes something unique like CurrentBar.
-
Thank you for the reply. I am trying to have an arrow drawn at the bar close when the strategy is true. I have the autoScale checked, bars ago is set to 0, there is a tag name in there but the 'Y' section is where I'm confused. What would be an appropriate number to put there so the arrow shows up?
Comment
-
Hello lbolton64,
For the drawing object y price you use a price that would be in the visible range of the chart. For example the Close price or Low/High depending on the direction of the condition. You need to hover the mouse over that field and click Set. Then choose a price value or indicator value, the Y scale or the scale on the right side of the chart scales by the prices you see.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
70 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
143 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
76 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
47 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
51 views
0 likes
|
Last Post
|

Comment