• 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

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?

    http://www.ninjatrader-support2.com/...splay.php?f=37
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        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-27-2018, 11:23 PM.

              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
                JoshNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Traderjoe2017, Today, 06:17 AM
                0 responses
                1 view
                0 likes
                Last Post Traderjoe2017  
                Started by tony98, Today, 06:05 AM
                0 responses
                2 views
                0 likes
                Last Post tony98
                by tony98
                 
                Started by Mr.Trader, Today, 04:11 AM
                0 responses
                9 views
                0 likes
                Last Post Mr.Trader  
                Started by 3lliot, Today, 01:00 AM
                2 responses
                12 views
                0 likes
                Last Post 3lliot
                by 3lliot
                 
                Started by JohnSteinberg, Yesterday, 04:19 AM
                0 responses
                23 views
                0 likes
                Last Post JohnSteinberg  
                Working...
                X