Announcement

Collapse
No announcement yet.

EFS BackTesting

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

  • EFS BackTesting

    Can anyone tell me why this will not trigger any trades?...

    ill add other stuff later, what i want right now is just to buy when a W4 is labeled, and Sell when a W5 is labeled...

    I can put return "This is a Wave 4" where the Strategy code is, and it will show when the bar is moused over...

    if (study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 4) {
    if (!Strategy.isLong) {
    Strategy.doLong("", Strategy.OPEN, Strategy.NEXTBAR, 100);
    Strategy.setStop(low(Math.abs(GetElliottStudy.MOST RECENTWAVEBARINDEX)));
    }
    } else if (study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 5) {
    if (Strategy.isLong) {
    Strategy.doSell("", Strategy.CLOSE, Strategy.THISBAR, 100);
    }
    }


    Thanks

  • #2
    Simple....

    You are passing the wrong parameters to the Strategy function.

    if (study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 4) {
    if (!Strategy.isLong) {
    Strategy.doLong("", Strategy.MARKET, Strategy.NEXTBAR, 100);
    Strategy.setStop(low(Math.abs(GetElliottStudy.MOST RECENTWAVEBARINDEX)));
    }
    } else if (study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 5) {
    if (Strategy.isLong) {
    Strategy.doSell("", Strategy.MARKET, Strategy.THISBAR, 100);
    }
    }
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      It still does not produce any trades, I invoked the PaperTradeBroker and it triggers in and out, more often that it should but it still triggers the buy/sell....

      I would just rather it work on the Strategy Analyzer...


      Thanks.

      Comment


      • #4
        OK - let's work on this...

        First, the Paper Trader module and the Strategy Backtester are two different things. We can't inter-mingle them and keep this thread clear to everyone.

        The code you presented and the request you made were for the Strategy Backtester. The change I made was designed to work with the Strategy Backtester - not the paper trader module.

        PHP Code:
        if (study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 4) {
          if (!
        Strategy.isLong()) {
           
        Strategy.doLong("Buy Signal"Strategy.MARKETStrategy.NEXTBARStrategy.DEFAULT);
           
        Strategy.setStop(low(Math.abs(GetElliottStudy.MOSTRECENTWAVEBARINDEX)));
         }
        } else if (
        study.getValue(GetElliottStudy.MOSTRECENTWAVE) == 5) {
          if (!
        Strategy.isShort()) {
           
        Strategy.doSell("Sell Signal"Strategy.MARKETStrategy.NEXTBARStrategy.DEFAULT);
          }

        Here is some revised code for you.. I also suggest you visit the EFS thread and click on EFS HELP CENTER & LIBRARY. Then click on the "Guide to EFS Strategies". This will help you alot more than I can offer in this thread.

        B
        Brad Matheny
        eSignal Solution Provider since 2000

        Comment


        • #5
          Oh.....

          One thing I just realized...

          the ELLIOT wave stuff is not capable of being back-tested... The results change as new bars are added to the charts and thus, this system is not designed to be backtested.

          So, the current direction of your code is "dead". Now, you could change it to use the Paper Trader Module and test it in realtime. This is the best advice I can offer.

          B
          Brad Matheny
          eSignal Solution Provider since 2000

          Comment


          • #6
            Ahh, Guess I will use the PaperTradeBroker then....

            Thanks for the help!

            Comment

            Working...
            X