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 lightsun47, Today, 03:51 PM
|
0 responses
4 views
0 likes
|
Last Post
by lightsun47
Today, 03:51 PM
|
||
Started by 00nevest, Today, 02:27 PM
|
1 response
8 views
0 likes
|
Last Post
by 00nevest
Today, 03:48 PM
|
||
Started by futtrader, 04-21-2024, 01:50 AM
|
4 responses
44 views
0 likes
|
Last Post
by futtrader
Today, 03:01 PM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
1 response
13 views
0 likes
|
Last Post
by bltdavid
Today, 02:44 PM
|
||
Started by port119, Today, 02:43 PM
|
0 responses
9 views
0 likes
|
Last Post
by port119
Today, 02:43 PM
|
Comment