Announcement

Collapse
No announcement yet.

Demand Index Alert

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

  • Demand Index Alert

    Hello,

    Can someone please help tweak the attached demand index to alert me when it crosses 0.5.

    Thank you

    Carlton
    Attached Files

  • #2
    Carlton
    The attached revision will play a sound when at the close of a bar the Demand Index has crossed either way 0.5
    Alex
    Attached Files

    Comment


    • #3
      Hey Alex,

      Thats exactly what I needed.

      Once again, thanks a lot mate.

      Cheers

      Carlton

      Comment


      • #4
        Hi Alex,

        After testing the modified efs I found that it was alerting after the DMI passed through 0.5 and not when it actually was 0.5. So I tried to tweak the line by replacing line 121 with the following:

        if(DMI_2=<0.5 && DMI_1=>0.5||DMI_2=>0.5 && DMI_1=<0.5){

        however this gave me a syntax error that I couldn't figure out. Instead of the =< I think I need a 'setcompute' commnad added somewhere. I wonder if you could help me when you get a chance.

        Cheers

        Carlton

        Comment


        • #5
          Carlton
          The syntax error is caused by => or =< which should be respectively >= or <=
          Alex

          Comment


          • #6
            Hi Alex,

            I made the corrections as you suggested, however I'm still not be alerting unil after the bar has closed - however I no longer get the syntax errors. This leads me to think that either I should include the setcomputeon (open) somewhere in the efs or its because I'm using bar replay to test it and may be when I use the script when actually trading it will alert me exactly when 0.5 is penetrated.

            Would you concur?

            Cheers

            Carlton

            Comment


            • #7
              Carlton
              In my first reply in this thread I do mention that the efs was set to sound an alert only at the close (ie completion) of a bar.
              Anyhow attached is a version that will work in real time and will sound one alert when 0.5 is crossed either way.
              Alex
              Attached Files

              Comment


              • #8
                Alex,

                I haven't had a chance to check the modified version. However, thanks a lot mate.

                Cheers

                Carlton

                Comment


                • #9
                  Hi Alex,

                  The script works perfectly.

                  Cheers dude.

                  Carlton

                  Comment


                  • #10
                    Alex is it possible to make a demand index like the one you have in the form of a histogram with the outline of the histogram outlined thickrer than the the bars of the histgram like woodies cci indicator where the outline is a thick blakc color and a drop dwn hst another colour

                    Many thks

                    Comment


                    • #11
                      silverxx12
                      Yes it is possible. At the end of the script replace return DMI; with return new Array(DMI,DMI); then in preMain() add two setPlotType() statements to define one of the plots as a line and the other as a histogram. Also add a setDefaultBarThickness() with the desired value to plot a thicker line. For the correct syntax on setPlotType() see the EFS KnowledgeBase under EFS Function Reference->Colors, Constants and Flags
                      Alex

                      Comment


                      • #12
                        Alexis is it possible you could just post an attachment with that efs i havent a clue about this efs stuff may seem simple to you but would proably take me a day to do

                        many thanks once again for all your help

                        Comment


                        • #13
                          modified demand index

                          i just read ur posting from 2004 there silverxxx
                          did u ever obtain the script u were looking for? i have modified the script from alex so that it displays as a histogram if u want it. it's attached.

                          bob
                          Attached Files

                          Comment

                          Working...
                          X