Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

be able to change color in exported strategy with indicator

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

    #16
    well i guess this answers the question.
    An indicator added by a strategy cannot be configured manually.

    I wanted the user to be able to change line colors of the indicator, when I export the strategy that is calling indicator.. I guess its not possible and only solution is to provide user with seperate indicator where he actually can change color lines.



    Comment


      #17
      Hello tkaboris,

      Correct, as stated in post # 9 a an indicator added by a strategy cannot be configured manually, and will only use the settings supplied by the strategy.

      "I wanted the user to be able to change line colors of the indicator, when I export the strategy that is calling indicator.. I guess its not possible and only solution is to provide user with seperate indicator where he actually can change color lines."

      Also, as suggested post # 2 you could add public properties to the strategy and use these to set the indicator values.
      Have you done this as directed?
      Chelsea B.NinjaTrader Customer Service

      Comment


        #18
        Also, as suggested post # 2 you could add public properties to the strategy and use these to set the indicator values.
        Have you done this as directed?​

        I couldnt figure out how to do that,

        Comment


          #19
          Hello tkaboris,

          In the Strategy:

          [NinjaScriptProperty]
          [XmlIgnore]
          [Display(Name="DownTrendColor", Description="Color of the down trend line.", Order=6, GroupName="Parameters")]
          public Brush DownTrendColor
          { get; set; }

          [Browsable(false)]
          public string DownTrendColorSerializable
          {
          get { return Serialize.BrushToString(DownTrendColor); }
          set { DownTrendColor = Serialize.StringToBrush(value); }
          }​

          In OnStateChange() when State is State.DataLoaded of the strategy:

          BTL = BBTrendLine(false, Strength, true, false, 60, DownTrendColor, Brushes.Green, Brushes.Black, Brushes.Green,3);
          Chelsea B.NinjaTrader Customer Service

          Comment


            #20
            ok and inside indicator, I dont have value plotted that references from strategy. DOes this look as it should if I want to add public properties to the strategy and use these to set the indicator values.
            set { DownTrendColor = Serialize.StringToBrush(value); }

            AlertOnBreak = false;
            Strength = 5;
            ShowHistory = true;
            LimitHistory = false;
            LimitHistoricalLookback = 60;
            DownTrendColor = Brushes.Black;
            UpTrendColor = Brushes.Green;
            lineWidth = 3;
            DownHistColor = Brushes.Black;
            UpHistColor = Brushes.Green;​
            Click image for larger version

Name:	image.png
Views:	64
Size:	37.7 KB
ID:	1315949

            Comment


              #21
              Hello tkaboris,

              Any values you want the user to be able to set on the indicator from the strategy, create a public input for that property and supply this to the indicator.
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by NullPointStrategies, Yesterday, 05:17 AM
              0 responses
              55 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              132 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              73 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              45 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              49 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X