Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-Time Frame Indicator Reference

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

    Multi-Time Frame Indicator Reference

    The attached indicator is attempting to use EMA's from a 3 minute time frame to filter a simple alert on one minute volume, but when I try to compile it I get a "Cannot apply indexing with[] to an expression of type 'double'"
    How do I get around this?
    TIA
    Attached Files

    #2
    Hello ECI-Ed,

    Thank you for your post.

    As you have already declared the BarsArray for the EMAs there is no need to call them as [1][0], just [0]:
    Code:
                     if (Avg < vBMinL && _emaf[0]>=_emas[0]) {
                     	    vol1col = Color.Yellow;
                     	    if (lAvg > vBMinL) {
                              PlaySound("Alert_Low_Vol.wav");
                          }
                      }
                     if (Avg < vBMinS&& _emaf[0]<_emas[0]) {
                     	    vol1col = Color.Yellow;
                     	    if (lAvg > vBMinS) {
                              PlaySound("Alert_Low_Vol.wav");
                          }
                      }
    For the Font you need to set this in the Intialize() method as the following:
    Code:
    Font textFont = new Font("Arial", 14);
    Attached is the indicator with the corrections.
    Attached Files

    Comment


      #3
      Thank you Patrick,

      That solved the compilation problem, but a new problem has appeared. The subpanel is now displaying 3 minute volume every third bar. I thought I could fix this by adding [0] after each time I called the Volume, but that hasn't fixed it. What am I missing?

      TIA

      Comment


        #4
        Hello ECI-Ed,

        Thank you for your response.

        I am not seeing the same item on my end. Can you provide a screenshot of this on your chart?

        Comment


          #5
          Sure. Attached is a screen shot of my 1 minute chart.
          Attached Files

          Comment


            #6
            Hello ECI-Ed,

            Thank you for your patience.

            Change the Vol.Set(Volume[0]); to Vol.Set(Volumes[0][0]);.

            For information on Volumes please visit the following link: http://www.ninjatrader.com/support/h...t7/volumes.htm

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            599 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            344 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            558 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            557 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X