Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't Call Indicator into Strategy

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

    Can't Call Indicator into Strategy

    I wrote a Super Simple Strategy and Indicator just to illustrate what I'm trying to do. I already have a strategy that calls an indicator Perfectly, and I tried to mimic that into this code but it's NOT working. Any ideas.

    This part of the code works fine
    Code:
    //THIS LINE WORKS FINE
    			if( DGVOLUMEPlotTESTER(Color.White).VolumePlot[0] == EMA(10)[0])
    			DrawDot("My dot" + CurrentBar, false, 0, Close[0] + 10 * TickSize, Color.Blue);
    This is the Part I want to work, but can't
    Code:
    if( DGVOLUMEPlotTESTER(Color.White).ExceedVol[0] )
    				DrawDot("Dot 2" + CurrentBar, false, 0, Close[0] + 10 * TickSize, Color.Red);
    Both Attached Below
    Attached Files

    #2
    Hello ginx10k,

    I am seeing that VolumePlot is a public data series that returns Values[0].

    public DataSeries VolumePlot
    {
    get { return Values[0]; }
    }

    However, I am not seeing any public bool series for exceedVol.

    You will need to make a public bool series like ExceedVol that returns exceedVol which is private.

    For example:
    [Browsable(false)]
    [XmlIgnore()]
    public BoolSeries ExceedVol
    {
    get { return exceedVol; }
    }
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      But Chelsea, it's already in the Indicator properties section. check it out please.
      Code:
      		//DG MOD: Expose Variable for Strategy to Use
      		[Browsable(false)]
              [XmlIgnore()]
              public BoolSeries ExceedVol
              {
      			// We need to call the Update() method to ensure our exposed variable is in up-to-date.
                  get { Update(); return exceedVol; }
              }
      Any other suggestions? I don't get why its NOT working

      Comment


        #4
        Hello ginx10k,

        What line is this code on?

        I am not seeing this in the file that you have attached to post #1.

        (Please download the file that you posted and open it and look for this line. Don't just look in the file that is on your computer which I am saying is likely different.)
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          OOPS. that's my Bad. I thought it was there. Here I've uploaded the indicator part.
          Attached Files

          Comment


            #6
            Problem solved

            Sorry for the Post. but its just that I didn't compile that Indicator after I wrote that Properties part. Sorry to waste your time. PROBLEM SOLVED

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            633 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X