Announcement

Collapse
No announcement yet.

Price Proxy: Feed JMA into Another Indicator

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

  • Price Proxy: Feed JMA into Another Indicator

    Trying to figure out if it is possible to use say RSX as a price proxy to feed into a trailing JMA and set it up like a Stochastic indicator.

    If anyone can help me out with this, it would be greatly appreciated.

  • #2
    If you want to feed the out put of the RSX to the input of a JMA you would write the code like this;

    if (getBarState() == BARSTATE_ALLBARS) {
    myRSXstudy = new JurikRSXStudy(RSX_len, Price);
    myJMAstudy = new JurikJMAStudy(JMA_len, JMA_phase, offset, myRSXstudy, JurikRSXStudy.RSX);
    }

    vValue1 = myRSXstudy.getValue(JurikRSXStudy.RSX);
    vValue2 = myJMAstudy.getValue(JurikJMAStudy.JMA);
    if (vValue1 == null || vValue2 == null) return;

    Here the actual script that is a JMA of a RSX. All you have to do is add the Stochastic logic.

    Let me know if you any help.
    Attached Files

    Comment


    • #3
      Let me check it out. Thanks for the quick response!

      Comment


      • #4
        I already had a Stoch of RSX with a JMA feed into the input of the RSX so I changed so that the RSX output is feed into the JMA and then stochastic logic is apllied to the JMA output.

        Let me know if that is what you want.
        Attached Files

        Comment


        • #5
          I'm still playing around with the Stoch file some, but the JMA of RSX file is absolutely incredible.

          This has made me think about more things you could use in order to develope some truly awesome indicators:

          Woodies 14 period CCI fed into a JMA
          Money Flow fed into JMA
          Keltner JMA bands

          whatever, thanks for the insights you've helped shown me in this. It's helping me to look at things much differently than before.

          Comment


          • #6
            You can get the CCI study at Jurik's website under freestuff.
            I have the money flow done so here you go. I might do the Keltner bands in little while just because I have not done them yet. I have alot of studies done for Jurik tools so let me know if you want them and I will create a zip file and upload them here or at a file share site.
            Attached Files

            Comment


            • #7
              I found two Keltner Calculations for the Bands so I included both in the script. Look at the script and play with it to figure out the settings.

              Note; if you are using the "Factor" channels only the Factor setting in edit studies applies.
              If you are using the "Variance" channel the Factor and Variance Length apply.

              Price, JMA Length and phase apply to both.
              Attached Files

              Comment


              • #8
                If you don't mind sharing what Jurik stuff you have, I would definitely like to see what you have. Thanks again for not only the quick responses but the generosity you've shown as well!

                Comment


                • #9
                  JMA as price proxy

                  I'm a new Jurik user and also new to Esignal as a charting application. I have the following two EFS's files below for MACD and Stoch. I would like to be able to have them calculate off of JMA-->JMA as proxy for price. Can anyone offer some assistance??? Also, is there a place to look for other Jurik based indicators???

                  Thanks
                  Diane

                  MACD

                  function preMain() {
                  setStudyTitle("MACD X-Over ");
                  setDefaultBarFgColor(Color.magenta, 0); // hist
                  setDefaultBarFgColor(Color.red, 1); // signal
                  setDefaultBarFgColor(Color.blue, 2); // macd

                  setPlotType(PLOTTYPE_HISTOGRAM, 0);

                  setCursorLabelName("Hist", 0);
                  setCursorLabelName("Signal", 1);
                  setCursorLabelName("MACD", 2);
                  }

                  var study = null;
                  var vMACD = null;
                  var vMACD1 = null;
                  var vSignal = null;
                  var vSignal1 = null;
                  var vAlert = false;
                  var AlertCntr = 0;

                  function main(nFastLength, nSlowLength, nSmoothing, nPriceSource, nSimpleMA_TorF) {
                  var nState = getBarState();

                  if (study == null) {
                  if (nFastLength == null)
                  nFastLength = 12;
                  if (nSlowLength == null)
                  nSlowLength = 26;
                  if (nSmoothing == null)
                  nSmoothing = 9;
                  if (nPriceSource == null) {
                  nPriceSource = "Close";
                  } else if(nPriceSource == "C" || nPriceSource == "O" || nPriceSource == "H" || nPriceSource == "L") {
                  nPriceSource = nPriceSource;
                  } else if(nPriceSource == "Close" || nPriceSource == "Open" || nPriceSource == "High" || nPriceSource == "Low") {
                  nPriceSource = nPriceSource;
                  } else if(nPriceSource == "HL/2" || nPriceSource == "HLC/3" || nPriceSource == "OHLC/4") {
                  nPriceSource = nPriceSource;
                  } else {
                  nPriceSource = "Close";
                  }
                  if (nSimpleMA_TorF == null) {
                  nSimpleMA_TorF = false;
                  } else if (nSimpleMA_TorF == "T" || nSimpleMA_TorF == "t" || nSimpleMA_TorF == "true" || nSimpleMA_TorF == "True") {
                  nSimpleMA_TorF = true;
                  } else if (nSimpleMA_TorF == "F" || nSimpleMA_TorF == "f" || nSimpleMA_TorF == "false" || nSimpleMA_TorF == "False") {
                  nSimpleMA_TorF = false;
                  } else {
                  nSimpleMA_TorF = false;
                  }
                  study = new MACDStudy(nFastLength, nSlowLength, nSmoothing, nPriceSource, eval(nSimpleMA_TorF));
                  }

                  if (nState == BARSTATE_NEWBAR) {
                  if (vMACD != null)
                  vMACD1 = vMACD;
                  if (vSignal != null)
                  vSignal1 = vSignal;
                  vAlert = false;
                  }
                  vMACD = study.getValue(MACDStudy.MACD);
                  if (vMACD == null)
                  return;
                  vSignal = study.getValue(MACDStudy.SIGNAL);
                  if (vSignal == null)
                  return;
                  var vHist = study.getValue(MACDStudy.HIST);
                  if (vHist == null)
                  return;

                  if (vAlert == false) {
                  if (vMACD1 < vSignal1 && vMACD >= vSignal) { // crossing up
                  vAlert = true;
                  AlertCntr += 1;
                  drawShapeRelative(0, vSignal, Shape.UPARROW, null, Color.yellow, Image.TOP | Image.ONTOP, "Alert" + AlertCntr);
                  }
                  if (vMACD1 > vSignal1 && vMACD <= vSignal) { // crossing down
                  vAlert = true;
                  AlertCntr += 1;
                  drawShapeRelative(0, vSignal, Shape.DOWNARROW, null, Color.yellow, Image.BOTTOM | Image.ONTOP, "Alert" + AlertCntr);
                  }
                  } else {
                  if ((vMACD1 < vSignal1 && vMACD < vSignal) || (vMACD1 > vSignal1 && vMACD > vSignal)) {
                  vAlert = false;
                  removeShape("Alert" + AlertCntr);
                  }
                  }

                  return new Array(vHist, vSignal, vMACD);

                  Stochastics

                  function preMain() {
                  setStudyTitle("Stochastic Double %D ");
                  setCursorLabelName("\%D1", 0);
                  setCursorLabelName("\%D2", 1);
                  setDefaultBarFgColor(Color.blue, 0);
                  setDefaultBarFgColor(Color.navy, 1);
                  }

                  var study1 = null;
                  var study2 = null;

                  function main(nKLength, nKsmoothing, nDlength1, nDlength2, nUpperBand, nLowerBand) {
                  if (nKLength == null) nKLength = 14;
                  if (nKsmoothing == null) nKsmoothing = 1;
                  if (nDlength1 == null) nDlength1 = 9;
                  if (nDlength2 == null) nDlength2 = 18;
                  if (nUpperBand == null) nUpperBand = 80;
                  if (nLowerBand == null) nLowerBand = 20;

                  if (study1 == null || study2 == null) {
                  study1 = new StochStudy(nKLength, nKsmoothing, nDlength1);
                  study2 = new StochStudy(nKLength, nKsmoothing, nDlength2);
                  addBand(nUpperBand, PS_SOLID, 1, Color.lightgrey, "upper");
                  addBand(nLowerBand, PS_SOLID, 1, Color.lightgrey, "lower");
                  }

                  var vD1 = study1.getValue(StochStudy.SLOW);
                  if (vD1 == null) return;
                  var vD2 = study2.getValue(StochStudy.SLOW);
                  if (vD2 == null) return;

                  return new Array(vD1, vD2);

                  Comment


                  • #10
                    Check out Jurik's site first and see if any of the free EFS do what you want.



                    As you know a MACD calculates the difference between two moving averages and then smooths thew difference with another moving average. Therefore to use Jurik as a price proxy for a MACD involves a bit of coding.

                    Comment


                    • #11
                      Price Proxy

                      Thanks for replying Whatever.

                      I have been to the Jurik web site but unfortunately I couldn't find what I was looking for. I also sent Erik an email asking for help but I'm thinking he's pretty busy with other projects as I haven't heard anything back from him.

                      I saw that you were able to help out some of users and clearly you posses java programming knowledge based on your other posts so I thought I would ask. Is this something I should seek to have coded by an Esignal programmer???

                      Thanks
                      Diane

                      Comment


                      • #12
                        I no longer use Esignal but I might have some old Esignal indicators the might help. There is no need to get a programmer to do it for you at this point. I will post in just a second and let you know what I fund.

                        You could also look at the JMA JMA MACD to get an idea on how to code it.

                        Comment


                        • #13
                          Actually i have a MACD with JMA Price Proxy but it was written by Chris Kryza at Divergence Software. It was very in expensive. I believe you can goto the web site and purchase it and it will be email to you very quickily. I did a quick scan of the code and it looks like it does what you are looking for. I also have two more files that are modifications of the Kryza code that I can send you after you purchase the code.

                          Here is the web site:

                          Comment


                          • #14
                            Price Proxy

                            OK, thanks. I bought the indicator from Chris - see the receipt below. They say I will receive it via email within 48hrs. Tell me, what platform do you now use and why did you switch away from Esignal???





                            Divergence Software, Inc. Invoice # 103848

                            Your Customer ID: 2133166 Your Password: xxxxxxxxDate: 2/4/2005 8:42:57 PM
                            Billing Information Shipping Information
                            Name DIANE RUSCONI Name DIANE RUSCONI
                            Description Qty Unit Price Discount Code Extended Price
                            eSignal Studies MISC01 - JMA MACD 1 $10.00 $10.00
                            License ID: 185753

                            Comment


                            • #15
                              I trade the Forex and have been developing machanical systems. Esignal only had six months worth of FOREX data. Tradestation finally begin to offer the FOREX and has two years worth of data.

                              I liked Esignal but they just did not have enough FOREX data to properly test strategies. I also needed more flexibility with the use of JMA which is used in the strategies. With Tradestation you can feed anything you want into anything. It is very flexible.

                              Comment

                              Working...
                              X