• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't get Indicator Values in Strategy Builder

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

    Can't get Indicator Values in Strategy Builder

    Hi, I'm trying to use the attached Wave Trend indicator in my strategy. But I can't get the values of the WTFast and WTSlow Plot from the indicator to do comparison. What do I need to add to the indicator script to be able to get this values to use?
    Attached Files

    #2
    Hello tjendra,

    Are you adding the indicator directly to a chart and the WTFast plot and WTSlow plot are not appearing?

    Or are you finding there isn't a public series to return Values[0] and Values[1]?
    You can use directly use Values[0] and [1] from a hosted indicator.
    For example:
    Print(WaveTrendV2(10, 21).Values[0][0]);

    Or you could add public series to return the plot series similar to the MACD indicator in the Properties region.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I am trying to use the values in a strategy so I should add public series to return the plot series similar to the MACD indicator in the Properties region? Is it I just add this bottom code to the indicator and recompile?

      [Browsable(false)]
      [XmlIgnore]
      public Series<double> Avg
      {
      get { return Values[1]; }
      }

      [Browsable(false)]
      [XmlIgnore]
      public Series<double> Default
      {
      get { return Values[0]; }
      }


      [Range(1, int.MaxValue), NinjaScriptProperty]
      [Display(ResourceType = typeof(Custom.Resource), Name = "WTFast", GroupName = "NinjaScriptParameters", Order = 0)]
      public int WTFast
      { get; set; }

      [Range(1, int.MaxValue), NinjaScriptProperty]
      [Display(ResourceType = typeof(Custom.Resource), Name = "WTSlow", GroupName = "NinjaScriptParameters", Order = 1)]
      public int WTSlow
      { get; set; }

      Comment


        #4
        Hello tjendra,

        The public integers would not be necessary.

        But yes, you can add public Series<double> objects that return Values[0] and Values[1].
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fredfred, Today, 04:17 PM
        0 responses
        1 view
        0 likes
        Last Post fredfred  
        Started by p.lozanski, Today, 03:51 PM
        0 responses
        4 views
        0 likes
        Last Post p.lozanski  
        Started by JTizz, Yesterday, 04:56 PM
        1 response
        25 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by brunoviveiros, Yesterday, 09:10 AM
        2 responses
        11 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by cyril120, Yesterday, 07:14 AM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X