Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plotting values on a strategy chart

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

    #16
    Unfortunately this would be expected, since there's no support for accessing calculations from other strategies, they would not cross communicate. A workaround could be reading / writing to textfiles.

    Comment


      #17
      Please give a tip on writing/reading it on a textfile. I tried it before but I have a difficulty on finding and getting the last written value in textfile. If you can give tips also on finding and getting the last written value then it would be great.

      Comment


        #18
        You can have a look into this dedicated sample for using System.IO - http://www.ninjatrader.com/support/f...ead.php?t=3477

        Comment


          #19
          Thank you Bertran I wish someone could give me a tips on File.ReadLastText().

          Comment


            #20
            You can always check into MSDN to work directly with the source of these C# methods, Google is of course helpful as well : http://msdn.microsoft.com/en-us/libr...(v=VS.90).aspx

            Comment


              #21
              Thank you Bertran. I hope next update on Ninja is that strategy can cross communicate as well.

              Comment


                #22
                Originally posted by luxurious_04 View Post
                Thank you Bertran. I hope next update on Ninja is that strategy can cross communicate as well.
                Thanks for the input, we're now tracking this suggestion under id 1002 in our system.

                Comment


                  #23
                  please help on this:

                  private double lossCutOff = -10000;


                  [Description("Loss Cut-off")]
                  [GridCategory("Parameters")]
                  [Gui.Design.DisplayName("Loss Cut-Off")]
                  public double LossCutOff
                  {
                  get { return lossCutOff; }
                  set { lossCutOff = Math.Max(0, value); }
                  }

                  I want to make a custom variable on system loss to negative but it will still 0 if I try to set the strategy to replay.

                  Comment


                    #24
                    This will not work as your Math.Max min value to use is 0, it acts as lower boundary here.

                    Comment


                      #25
                      What should my Math.Max so that it will accept negative numbers? Please help me.

                      Comment


                        #26
                        You can remove Math.Max() if you want to accept negative values for your input.

                        [Description("Loss Cut-off")]
                        [GridCategory("Parameters")]
                        [Gui.Design.DisplayName("Loss Cut-Off")]
                        public double LossCutOff
                        {
                        get { return lossCutOff; }
                        set { lossCutOff = value; }
                        }
                        Ryan M.NinjaTrader Customer Service

                        Comment


                          #27
                          Thank you so much RyanM.

                          Comment


                            #28
                            Anyone there could give me tips on the code to know if the HeikenAshi bar is green or red?

                            Comment


                              #29
                              Hello,

                              Please see me response from the other thread:



                              If you have limited time or programming capabilities, you can discuss your requirements with any of our NinjaScript consultants.
                              MatthewNinjaTrader Product Management

                              Comment


                                #30
                                Does the example above still work for NT7? Is there an easier way to go about this in NT7?

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                647 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                368 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                108 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                571 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                573 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X