Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.
JesseNinjaTrader Customer Service
-
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.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Tin34, Today, 03:30 AM
|
2 responses
20 views
0 likes
|
Last Post
by Tin34
Today, 04:11 AM
|
||
Started by sastrades, Yesterday, 09:59 AM
|
2 responses
33 views
0 likes
|
Last Post Today, 04:06 AM | ||
Started by ETFVoyageur, Today, 12:52 AM
|
1 response
18 views
0 likes
|
Last Post Today, 03:36 AM | ||
Started by lollers, Today, 03:26 AM
|
0 responses
19 views
0 likes
|
Last Post
by lollers
Today, 03:26 AM
|
||
Started by aliyahany, Today, 03:16 AM
|
0 responses
4 views
0 likes
|
Last Post
by aliyahany
Today, 03:16 AM
|
Comment