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!
See more
See less

Partner 728x90

Collapse

Problems with following SampleBoolSeris example

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

    Problems with following SampleBoolSeris example

    I'm following the BoolSeriesSample to share bool logic in one indicator with another indicator.

    I created the source indicator and inserted the boolseries variables. I then tried to add the source indicator to my target indicator.

    The source indicator "SignalTrend" and the target is "MovingAvg".

    In the target indicator I added the source indicator as follows:

    Add(SignalTrend());

    but got the following error message on compile:

    Argument '1': cannot convert from 'NinjaTrader.Indicator.SignalTrend' to 'NinjaTrader.Gui.Chart.Line'

    Can someone tell me what the error message is telling me?

    Thanks,

    taddypole...

    #2
    taddypole, unfortunately indicators could only added to the Initialize() method of strategies for display and not to other indicators. In a strategy that Add() statement would compile well.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Is there any way to get logic from an indicator in a panel to the price plot? Other than creating a second indicator for display in the price panel?

      Comment


        #4
        Some users have had success with dynamically setting DrawOnPricePanel true / false in their indicators, but officially we could not support that technique, the recommended way would be price panel helper indicator then.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I've tried the DOPP true,false technique following those who have been successful with it but can't get it to work. It continues to only plot in the panel.

          I set DOPP to true in the initialize section, then to false for the first part of the code and then to true for the code section to draw in the price panel, but it would only plot in the indicator panel for me. Not sure it COBC has anything to do with it, I run in COBC = false.

          When you say, "Price Panel Helper Indicator" are just referring to a duplicate indicator for the price panel? My goal is to take logic from several indicators and combine them into one draw object on the price panel. Creating multiple duplicate indicators seems inefficient.

          regards,

          taddypole...

          Comment


            #6
            Yes, there are cases where it works and others where it won't - we have this area on our list of feedback to consider for the future.

            Correct, then you would need an indicator combing logic from your other indicator methods on the price panel. Indicators instances would be attempted to be cache by NT where possible.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Thanks Bertrand,

              For my Helper indicator and to take advantage of caching, what things do i need to consider?
              Is it just and exact duplicate of the indicator applied to the price panel?

              Comment


                #8
                Taddypole,

                Yes, an indicator to draw on price panel and an indicator draw on other panels. You don't have to do anything to take advantage of indicator caching. It's all managed internally.
                Ryan M.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by gravdigaz6, Yesterday, 11:40 PM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by MarianApalaghiei, Yesterday, 10:49 PM
                3 responses
                10 views
                0 likes
                Last Post NinjaTrader_Manfred  
                Started by XXtrader, Yesterday, 11:30 PM
                0 responses
                4 views
                0 likes
                Last Post XXtrader  
                Started by love2code2trade, 04-17-2024, 01:45 PM
                4 responses
                28 views
                0 likes
                Last Post love2code2trade  
                Started by funk10101, Yesterday, 09:43 PM
                0 responses
                9 views
                0 likes
                Last Post funk10101  
                Working...
                X