Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing Strategy properties from indicator

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

    #16
    Hi Brett:

    The fundamental problem is that the indicator is drawn after the strategy has completed (and presumably after the Strategy object has been destructed) if executed from the Strategy Analyzer.

    This has two distinctly different consequences:
    1) It is not possible to access the Strategy object from the indicator while the indicator is being drawn to the chart by Strategy Analyzer (although it is possible to access this object from the indicator when called by the strategy).
    2) Any drawing objects applied to an indicator from within the strategy (as in SampleStrategyPlot) take effect if the strategy is called from a chart, but not if the chart is constructed by the Strategy Analyzer.

    Together, these two problems make it very difficult to draw to indicator panels of charts initiated by the Strategy Analyzer.

    Regards,

    Mark

    Comment


      #17
      Hello,

      I will check into if this is expected or something on developments list.

      Thanks for your patience.
      BrettNinjaTrader Product Management

      Comment


        #18
        Hello,

        This is something that is specifically mentioned on the SampleStrategyPlot sample as a NOTE on the SampleStrategyPlot page.

        http://www.ninjatrader.com/support/f...ead.php?t=6651

        This is a current limitation and development is aware of this. I have had them add this to the suggestion list to possibly change how this works in a future version of NinjaTrader. Thank you very much for your recommendations to help NinjaTrader become a better trading tool and it have been given number 763 in our suggestion tracking system.

        Thank You and have a great rest of the day.
        BrettNinjaTrader Product Management

        Comment


          #19
          I am thirsty for you email with unreleased library from NinjaTrader.

          Comment


            #20
            Hello,

            I do not understand the request. Can you please clarify.

            -Brett
            BrettNinjaTrader Product Management

            Comment


              #21
              I guess Ninja Indicator Class or other(maybe a char class) has a lot of functions unleased.
              for example:
              I am running a 1-min chart,living tick is coming,every 1-min bar is forming timely.
              There must be a functionality counting every tick,and storing every tick.
              How I wish I could access these functionality,and intercept to change bar chart looking.

              You said:"Please send me a note to support at ninjatrader dot com ATTN: Brett with this forum post references and I will send you the unsupported script from code that may be a better way for you to do this."

              Comment


                #22
                Unfortunately the post below you are quoting was over a year ago and I am not sure what I sent him nor do I have the code snippit any further.

                As far as functionality I believe you want to create your own chart style.

                This is unfortunately not supported.
                BrettNinjaTrader Product Management

                Comment


                  #23
                  My quoting was only a year ago.
                  Our hope is quoting thousands years ago!
                  Do help me!

                  Comment


                    #24
                    Hello,

                    What is you exact problem and what are you trying to do lets start there.

                    -Brett
                    BrettNinjaTrader Product Management

                    Comment


                      #25
                      Sorry,I didnot announce my problem clearly.
                      What is my farsight problem is finding our Holy Grail but could we?
                      My nearsight problem is not so clear,but I found three clouds in Ninja:
                      1)I want intercept chart class data in order to polish bar chart more charming.Anyhow,we perceive Trueth from bright picture,Data is trueth,I want draw my view.Give me some code about it.eg I hear about Plot().
                      2)I want share Indicator data and functionality,but I amnot sure I can reference the exact Indicator,because many chart running same kind of Indicator.So many guys here talking about BoolSeries,I think the real solution lies in inheritence,as I discussed with Bertrand @http://www.ninjatrader.com/support/forum/showthread.php?t=49339,Please help me about Indicator base or someother Class.
                      3)Ninja give us Indicator and Strategy etc Classes,that is so great,but Ninja donot give us the power when to start and where to end programatically,we can only through Menu click."...man from the dust of the ground, and breathed into his nostrils the breath of life; and man became a living soul",Guide them,don't let them lead themselve! So please enpower us in programs to tell Indicators and Strategies when to start where to end,not themselves dominanting eachother.
                      I have not test with any serious code now,because of the three clouds above.I wish every step with bright ligth of the world.
                      Yours truely.

                      Comment


                        #26
                        Hello,

                        1) This is largely unsupported and essentially up to you to play around and figure it out. There is a samplePlotOverride built into the product under control center->tools->edit NiniaScript->strategies->SamplePlotOverride

                        2) Please use this sample is the only supported method for this.

                        http://www.ninjatrader.com/support/f...ead.php?t=4991

                        3) I dont understand the question.

                        -Brett
                        BrettNinjaTrader Product Management

                        Comment


                          #27
                          Thank you for answer 1,
                          The third question is:
                          eg,we can weave Strategy on chart only through Menu(right click mouse,select add Strategy),then in add-on Strategy's OnInitialize() or OnStartUp() weave
                          other indicator programatically,then OnBarUpdate() judge each Indicator's performance,then take some action accordingly.
                          I think this is "Strategy dominate Indicator" method.Sure,It is a great method.
                          But my idea is:
                          There should be a place,many indicators serving there,services are:
                          1)Every chart feeding data in and retrieving result out.This is "Indicator anarchy" or "Indicator dominate themselves".
                          2)Every chart feeding data in and retrieving result out,and Strategy judge its Indicator's performance,take actions.This is the "Strategy dominate Indicator"
                          senario.
                          The above two are now great achievement Ninja providing us.But my hope is much more superior under:
                          3)In the place where many indicators serving there,we can programatically do more wonderful things.
                          eg,we can judge from many indicators depicting different market sector instrument,and make a conclulsion:the Bank sector is moving up rapidly.
                          eg,we can judge the whole market is sythetically trending.
                          eg,we can share data across indicators or strategies easily in the place.Which is the famous BoolSeries aiming at.
                          I Call the 3) service "We dominate Indicator and Strategy" and market depth analysis.
                          I wish Ninja give us access to the realm of the 3) services place.
                          Yours Truely.

                          Comment


                            #28
                            Thanks for the suggestion. Unfortunately this would not be possible as only indicators can be hosted from another indicator or strategy.

                            -Brett
                            BrettNinjaTrader Product Management

                            Comment


                              #29
                              Originally posted by maorachow View Post
                              Thank you for answer 1,
                              The third question is:
                              eg,we can weave Strategy on chart only through Menu(right click mouse,select add Strategy),then in add-on Strategy's OnInitialize() or OnStartUp() weave
                              other indicator programatically,then OnBarUpdate() judge each Indicator's performance,then take some action accordingly.
                              I think this is "Strategy dominate Indicator" method.Sure,It is a great method.
                              But my idea is:
                              There should be a place,many indicators serving there,services are:
                              1)Every chart feeding data in and retrieving result out.This is "Indicator anarchy" or "Indicator dominate themselves".
                              2)Every chart feeding data in and retrieving result out,and Strategy judge its Indicator's performance,take actions.This is the "Strategy dominate Indicator"
                              senario.
                              The above two are now great achievement Ninja providing us.But my hope is much more superior under:
                              3)In the place where many indicators serving there,we can programatically do more wonderful things.
                              eg,we can judge from many indicators depicting different market sector instrument,and make a conclulsion:the Bank sector is moving up rapidly.
                              eg,we can judge the whole market is sythetically trending.
                              eg,we can share data across indicators or strategies easily in the place.Which is the famous BoolSeries aiming at.
                              I Call the 3) service "We dominate Indicator and Strategy" and market depth analysis.
                              I wish Ninja give us access to the realm of the 3) services place.
                              Yours Truely.
                              To do #3, you just need to create a custom index using a multi-instrument class (indicator or strategy), or a partial class.

                              Comment


                                #30
                                Thank you Brett and koganam!
                                koganam,your choice is practical for my 3) question,but I bet,my solution is the right way in the future.
                                Brett,I have anther advice:
                                Can I attach some personal data object for every bar,when I click the bar the private data pop up?
                                Yours truely.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by fmcap, Today, 10:49 PM
                                0 responses
                                2 views
                                0 likes
                                Last Post fmcap
                                by fmcap
                                 
                                Started by iradielt, Today, 10:06 PM
                                0 responses
                                2 views
                                0 likes
                                Last Post iradielt  
                                Started by gbajaj, Today, 03:35 PM
                                2 responses
                                11 views
                                0 likes
                                Last Post gbajaj
                                by gbajaj
                                 
                                Started by space_trader, Today, 03:19 PM
                                2 responses
                                8 views
                                0 likes
                                Last Post space_trader  
                                Started by max1ci6, Today, 02:02 AM
                                4 responses
                                28 views
                                0 likes
                                Last Post joromero  
                                Working...
                                X