Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Demand Index

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

    Demand Index

    Has anyone coded the Demand Index designed by James Sibbet?

    #2
    billm, unfortunately I'm not aware of one already posted, have you checked into the sharing section already?

    Comment


      #3
      Hello Bertrand, yes, I searched and found nothing posted. As it is a less popularized calculation from the days of computrac maybe its value has been overlooked?

      Comment


        #4
        Might be, I don't think it's that popular - if you have the formula and want to give it a shot, here are the indicator coding tutorials - http://www.ninjatrader-support.com/H...verview18.html

        Comment


          #5
          I have used the Demand Index for years and find it helpful at divergent bottoms (i.e. BA on 06/07/2010). I am converting from TradeStation, have the TS2ki code and would be thankful if someone can code it in NT

          Comment


            #6
            Coded Demand index for NT 7.0

            Originally posted by billm View Post
            Has anyone coded the Demand Index designed by James Sibbet?

            This is the Coded from another platform, can some one coded it for NT7.0

            #

            declare lower;

            input length = 5;

            def wClose = (high + low + 2 * close) * 0.25;
            def wCRatio = (wClose - wClose[1]) / Min(wClose, wClose[1]);
            def closeRatio = 3 * wClose / Average(Highest(High, 2) - Lowest(Low, 2), length) * AbsValue(wCRatio);
            def volumeRatio = Volume / Average(Volume, length);
            def volumePerClose = volumeRatio / exp(Min(88, closeRatio));
            def buyP;
            def sellP;
            if (wCRatio > 0) {
            buyP = volumeRatio;
            sellP = volumePerClose;
            } else {
            buyP = volumePerClose;
            sellP = volumeRatio;
            }
            def buyPres = if IsNaN(buyPres[1]) then 0 else ((buyPres[1] * (length - 1)) + buyP) / length;
            def sellPres = if IsNaN(sellPres[1]) then 0 else ((sellPres[1] * (length - 1)) + sellP) / length;
            def tempDI;
            if ((((sellPres[1] * (length - 1)) + sellP) / length - ((buyPres[1] * (length - 1)) + buyP) / length) > 0) {
            tempDI = - if (sellPres != 0) then buyPres / sellPres else 1;
            } else {
            tempDI = if (buyPres != 0) then sellPres / buyPres else 1;
            }
            plot DMIndx = if IsNaN(close) then Double.NaN else if tempDI < 0 then -1 - tempDI else 1 - tempDI;
            plot ZeroLine = 0;

            DMIndx.setDefaultColor(GetColor(1));
            ZeroLine.SetDefaultColor(GetColor(5));

            Comment


              #7
              Originally posted by [email protected] View Post
              This is the Coded from another platform, can some one coded it for NT7.0

              #

              declare lower;

              input length = 5;

              def wClose = (high + low + 2 * close) * 0.25;
              def wCRatio = (wClose - wClose[1]) / Min(wClose, wClose[1]);
              def closeRatio = 3 * wClose / Average(Highest(High, 2) - Lowest(Low, 2), length) * AbsValue(wCRatio);
              def volumeRatio = Volume / Average(Volume, length);
              def volumePerClose = volumeRatio / exp(Min(88, closeRatio));
              def buyP;
              def sellP;
              if (wCRatio > 0) {
              buyP = volumeRatio;
              sellP = volumePerClose;
              } else {
              buyP = volumePerClose;
              sellP = volumeRatio;
              }
              def buyPres = if IsNaN(buyPres[1]) then 0 else ((buyPres[1] * (length - 1)) + buyP) / length;
              def sellPres = if IsNaN(sellPres[1]) then 0 else ((sellPres[1] * (length - 1)) + sellP) / length;
              def tempDI;
              if ((((sellPres[1] * (length - 1)) + sellP) / length - ((buyPres[1] * (length - 1)) + buyP) / length) > 0) {
              tempDI = - if (sellPres != 0) then buyPres / sellPres else 1;
              } else {
              tempDI = if (buyPres != 0) then sellPres / buyPres else 1;
              }
              plot DMIndx = if IsNaN(close) then Double.NaN else if tempDI < 0 then -1 - tempDI else 1 - tempDI;
              plot ZeroLine = 0;

              DMIndx.setDefaultColor(GetColor(1));
              ZeroLine.SetDefaultColor(GetColor(5));
              I always look out for interesting volume indicator, try this.
              Edit: just realize this is almost 10 year old thread.
              Attached Files
              Last edited by nkhoi; 04-28-2018, 12:23 AM.

              Comment


                #8
                This indicator has been converted to NT8 and can be found at the following link:
                https://ninjatrader.com/support/foru...=7&linkid=1091
                Josh G.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                597 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                343 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
                556 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                555 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X