Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set the default PriceType to Weighted

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

    Set the default PriceType to Weighted

    Hello,

    How to set in code indicator's default for input series property parameter PriceType to Weighted? Something like:

    Code:
    ((PriceSeries)Input).PriceType = PriceType.Median;
    Thank you

    #2
    Hello AiTrading,

    If you wanted to always use the Median for the input in the indicator you can reference the Median series directly inside the indicator: https://ninjatrader.com/support/help...ightsub=median

    You would otherwise need to pass the Median series to the indicator if it uses Input in its logic.

    The same exists for weighted series: https://ninjatrader.com/support/help...htsub=weighted


    Comment


      #3
      Hi Jesse,

      Thank you for your reply.

      The indicator is sensitive to price dynamics, so it works better with Weighted price. If a user forgets to switch to Weighted, may result in poor performance. I hope there will be a solution for this.

      I would also love to set the default line width, but found no solution for it either.

      Thank you

      Comment


        #4
        Hello AiTrading,

        The link I posted in post 2 would be the solution if you wanted to always use weighted values. You can either program the indicator to use weighted series or if the indicator specifically is using Input for its logic the calling script would pass Weighted as its input. If the plan is to manually apply the indicator then you need to program the indicator to just use the weighted series in its code.

        You can specify the plots width when configuring it with AddPlot: https://ninjatrader.com/support/help...ghtsub=addplot



        Comment


          #5
          Hi Jesse,

          Unfortunately Weighted is preferred but may not be the best. Moreover, this parameter cannot be saved as a default.

          Regards

          Comment


            #6
            Hello AiTrading,

            You can use one of the platforms built in series if one meets your needs, you can otherwise calculate a value.

            In regard to using that for input, if you need your script to use specific data as default the you just need to program your script to do that and not rely on the users input series.

            Your original question was:
            How to set in code indicator's default for input series property parameter PriceType to Weighted? Something like:
            You cant set a default input series for the UI, you would just use that series in your code if you needed to use it as a default. You can also use the Input series if you wanted to accept other input series in place of the weighted series. To use the weighted as default you can use the Weighted series in your logic: https://ninjatrader.com/support/help...l?weighted.htm



            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            566 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            547 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            548 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X