Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy indicator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    #2
    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.

    Comment


      #3
      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


        #4
        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
        65 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        139 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X