Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator OnBarClose from Strategy

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

    Indicator OnBarClose from Strategy

    Hi

    I have a strategy that calculates on each tick and tried to add a doji from code however it does not seem to work as my chart is now filled with doji found text. It works fine if I add it from the UI. Also if I change the strategy to OnBarClose I can add it find from code.

    any ideas?

    #2
    Hello,

    Thank you for the post.

    I wanted to check, when you add the indicator with the UI, are you setting it as calculate OnBarClose? Does it have the same problem if you manually set the indicator to calculate on each tick instead?

    If so, you would either need to have the strategy calculate on bar close, or re program the indicator to work the same On each tick. You could use properties like IsFirstTickOfBar to know when a bar has opened/closed as one example.
    http://ninjatrader.com/support/helpG...FirstTickOfBar
    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      the indicator works fine for both modes when i use the UI.

      Comment


        #4
        Hello,

        Thank you for confirming.

        In the case where it only does not work in one situation, you would likely need to debug that specific situation.

        I would likely suggest creating a more simple example of the strategy that calls the indicator to start with or even just a new script to test the indicator by its self.

        If you could do this and then provide the syntax on how the indicator is being used in the strategy it may provide some more detail as to what is happening.

        Outside of doing this, you would very likely need to add prints into the indicator and then check both the working and non-working situation to see what is being evaluated differently.

        We have a short guide with general debugging steps at the following link: http://ninjatrader.com/support/forum...49&postcount=2


        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by twitch251, Today, 05:14 PM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by robforee2, Today, 05:07 PM
        0 responses
        1 view
        0 likes
        Last Post robforee2  
        Started by blar58, Today, 03:16 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Melissa  
        Started by alcorr247, Today, 02:52 PM
        2 responses
        7 views
        0 likes
        Last Post robforee2  
        Started by Radano, Today, 02:30 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Working...
        X