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

Indicator with DrawTextFixed Output

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

    #16
    Originally posted by laocoon View Post
    Thanks for your comment Koganam, you're absolutely correct.
    This was actually intended, as the " High[0] is equal to High[1]" condition is the only condition in my strategy where the tag can REMAIN on the chart (after the bar has closed and the new one opens).

    I'm still looking for an easier way to code this though, as the thing I'm really trying to achieve is the following:

    If strategy conditions are met (on 10 min chart): draw tag on chart
    Once current 10 min bar has closed (and thus signal is no longer valid): remove tag
    If conditions are met again on another 10 min bar: draw tag
    etc.

    It sounds embarassingly easy but I wasn't able to code it so far.

    Thanks
    What is the COBC setting?

    Comment


      #17
      RyanM,

      Thanks a lot for that, it works great.
      One last question: is there a way to remove those tags MANUALLY as well?
      My strategy also draws small arrows on the chart and I can remove them manually whenever I need to, but with the tags it doesn't work

      Thanks a lot for your help, much appreciated.

      Comment


        #18
        You can set in your strategies Initialize() method:AllowRemovalOfDrawObjects = true;
        It will allow manual removal of these.
        Last edited by NinjaTrader_RyanM1; 01-17-2012, 11:03 AM. Reason: Correcting wrong information.
        Ryan M.NinjaTrader Customer Service

        Comment


          #19
          I understand what you're saying and I obviously don't doubt it, but it is strange then that I'm able to remove the small arrows that my strategy generates since they're obviously also attached to the strategy (and the strategy remains enabled although I remove arrows from time to time).

          Comment


            #20
            Do you mean the plot executions when strategy fills orders? There is a UI control for this, but this is not related at all to drawing objects placed by strategy code.

            If you mean something different, I'm happy to give your strategy a run here to see what the differences may be.
            Ryan M.NinjaTrader Customer Service

            Comment


              #21
              RyanM,

              I don't mean plot executions but arrows that are drawn by my custom strategy when there's a trading signal (as per my conditions).

              You can replicate this with the following sample code (AllowRemovalOfDrawObjects is set to true).
              Instead of my own conditions I simply use a green candle as the signal to draw an arrow:

              if (Close[0] >Open[0]
              {
              DrawArrowUp("Long" + CurrentBar, false, 0, Low[0]- 2*(TickSize), Color.Black);
              }

              Once the arrow is drawn you can remove it without removing the strategy.
              The same thing doesn't work though with DrawTextFixed and its tags.

              Thanks

              Comment


                #22
                I see - thanks for the reply. I had overlooked that property AllowRemovalOfDrawObjects, and it looks to do exactly what you want. I've corrected previous post for accuracy - thanks again.
                Ryan M.NinjaTrader Customer Service

                Comment


                  #23
                  Thanks RyanM. It is a pity though that the same process doesn't work with objects that were drawn with the DrawTextFixed command. This would be a feature request on my side.

                  Thanks

                  Comment


                    #24
                    I see what you mean, and have sent to our development team to consider a change for this in a future version. This has been assigned tracking id # 1490. Thanks for the feedback.
                    Last edited by NinjaTrader_RyanM1; 01-25-2012, 09:19 AM.
                    Ryan M.NinjaTrader Customer Service

                    Comment


                      #25
                      Very good. Thanks again for your help and have a great day.

                      Comment


                        #26
                        You're welcome. Have a great day as well. This has been assigned tracking id # 1490.
                        Last edited by NinjaTrader_RyanM1; 01-25-2012, 09:19 AM.
                        Ryan M.NinjaTrader Customer Service

                        Comment


                          #27
                          Thanks for the update RyanM.
                          How can I follow the evolution using the Tracking ID?

                          Thanks & have a great day

                          Comment


                            #28
                            There is not yet an update on this, but you can use our support email to request future updates on feature requests. Send a note to support 'at' ninjatrader 'dot' com and include the tracking # for the item.
                            Ryan M.NinjaTrader Customer Service

                            Comment


                              #29
                              OK, thanks for that.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by CortexZenUSA, Today, 12:53 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post CortexZenUSA  
                              Started by CortexZenUSA, Today, 12:46 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post CortexZenUSA  
                              Started by usazencortex, Today, 12:43 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post usazencortex  
                              Started by sidlercom80, 10-28-2023, 08:49 AM
                              168 responses
                              2,265 views
                              0 likes
                              Last Post sidlercom80  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              3 responses
                              12 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Working...
                              X