Announcement

Collapse
No announcement yet.

adx....

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

  • adx....

    How do you make a 14 period ADX with a horizontal line at the 30 value?

    Can this be done via Formula Wizard?



    --MIKE

  • #2
    addBand(dValue, nStyle, nThickness, Color)

    Draws a horizontal line in a study pane. Useful in charts such as RSI & Stochastic.

    dValue the y-axis value to place the band.

    nStyle – a pen style

    nThickness – thickness of line (in pixels).

    Color – a RGB color value.

    addBand(80.0, PS_SOLID, 1, Color.black);

    addBand(80.0, PS_SOLID, 1, Color.RGB(0x00, 0x00, 0x00));

    var study = new ADXDMStudy(14, 14);

    function preMain() {
    setDefaultBarFgColor(Color.RGB(255, 0, 255), 0); // ADX
    setDefaultBarFgColor(Color.blue, 1); // PDI
    setDefaultBarFgColor(Color.red, 2); // NDI
    addBand(30,PS_SOLID,1,Color.red);

    }

    function main() {
    var vADX = study.getValue(ADXDMStudy.ADX);
    var vPDI = study.getValue(ADXDMStudy.PDI);
    var vNDI = study.getValue(ADXDMStudy.NDI);

    return new Array(vADX, vPDI, vNDI);

    need to edit Formula Wizrd to get this.

    Comment


    • #3
      can u make the formula into an efs file?

      Comment


      • #4
        Mike
        Attached is David's formula saved as efs
        Save it to any of the subfolders of the Formulas folder in eSignal.
        Alex
        Attached Files
        Last edited by ACM; 02-06-2003, 10:13 PM.

        Comment


        • #5
          Thanks... but I only need ADX.. not the +/- DMI....

          Can this simply be done via the formula wizard?

          Comment


          • #6
            Mike
            Yes, but as David said, you would need to edit the code with the lines he provided.
            Anyhow here is the same with ADX only. This was created using the Formula Wizard and then editing the efs with the Editor to add the line at 30
            Hope this helps
            Alex

            Note: This is now the correct efs as I have deleted the message that contained the wrong one
            Attached Files
            Last edited by ACM; 02-06-2003, 10:12 PM.

            Comment


            • #7
              How do you do a histogram of the +DMI subtractred from -DMI..????

              Its visually easier than seeing the lines cross??

              Comment


              • #8
                Mike
                Is this what you want? See attached efs.
                Alex
                Attached Files

                Comment


                • #9
                  thanx

                  Comment


                  • #10
                    Mike
                    While at it I modified the formula with the histogram of PDI-NDI to also show the ADX line (efs is attached).
                    Seeing that your intial request in this thread was to have a horizontal line at 30 what I did was to subtract 30 from the ADX so that when it crosses the 0 line of the histogram it is essentially the same as crossing 30.
                    If you want to modify this value just open the efs with the Editor and change the -30 value in line 55
                    Alex
                    Attached Files

                    Comment


                    • #11
                      Alex, how can i backtest using your adxdm.efs? I've tried implementing into wizard, but showing no trades.
                      Michael

                      Comment


                      • #12
                        Michael
                        The efs was programmed as an indicator only. You need to create a strategy based on it.
                        You can use the Formula Wizard to do that
                        Alex

                        Comment


                        • #13
                          i've attempted to... created strategy to go long when indicator goes +, and reverse when indicator goes - .
                          Michael

                          Comment


                          • #14
                            but doesn't result in any trades in backtest. help?
                            Michael

                            Comment


                            • #15
                              Alex,
                              I believe the problem is consistent with those in this thread...Use of Studies not on FW Builtin Studies List . Thus I am not getting trades in backtest because FW is actually looking at another adxdm number, which isn't the same as on your histogram. Do you have any suggestions?
                              Attached Files
                              Michael

                              Comment

                              Working...
                              X