Page 4 of 11 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 109
  34 34 Attachment(s)    

Thread: PentzParabolic v1.0

  1. #31

    Default

    Quote Originally Posted by DonAdams View Post
    Have you backtested this?

    I tested on fiber with default settings since start of year as you suggest. With AutoLotSize = false and trading 0.01 lots its drawdown was over 26k. Whilst it somehow didn't blow the 10k test account, the net loss was 9.9k so it wasn't too far off a blowout.

    I then tested it with AutoLotSize = true and, guess what, it did blow the account.

    I don't want to be too critical, because I acknowledge that you don't have to share your work, but there are parts of the code that have been poorly thought out. Firstly, you should have used the StringSubstr() function to overcome the various prefixes and suffixes used by brokers. Even so, you don't even need all of those different magic numbers as you should include the Symbol() within the conditions. Finally, just a simple check to see if the Trade Context is busy or not isn't really enough.
    "Firstly, you should have used the StringSubstr() function to overcome the various prefixes and suffixes used by brokers." Can you give me an example? Not sure what you're referring to.

    There are many ways to do the same thing ... using the magic numbers for each of the pairs is one way of dealing with multiple concurrent pairs on one account.

    Paul

  2. #32

    Default

    Quote Originally Posted by ppentz View Post
    What errors are you seeing? It should work fine on Alpari, although I haven't tested it directly. I have a demo account so I'll try it.

    I have it running on a FXOpen demo account right now that is a mini account so it has default lot size of 0.1. So far the results have been good. It sounds like you manually set the LotSize and LotStep parameters to 0.1? What balance did the account have? What was the setting of the "FreeMarginMin" paramter?
    ppentz,
    You'll find attache the log file for the errors.
    I did setup manually the LotSize and LotStep parameters to 0.1 in the "Expert properties", all the other parameters are left to default. The initial deposit is of $10,000.
    FYI, to be more accurate I did not use a demo account from alpari per say, I did download MT4 from Forex Trading Platform MetaTrader 4 and used the feature within it to open a demo account, it uses alpari servers.
    Attached Files Attached Files

  3. #33

    Default

    ppentz,

    I did some more back testing with historical data on the FXDD demo account for the last 3 months.
    Attached are the results.
    *First observation:
    Same results with 0.01 lots and 0.1 lots (LotSize and LotStep).
    I noticed that the pairs are quoted on 4 digits and not 5 like for the demo account running on the Alpari server, it could be a lead for troubleshooting.
    *Second observation:
    There are major drawdowns which make the EA less performing than it could. I am surprised that you do not use stoploss, is there any particular reason?
    Attached Images Attached Images PentzParabolic v1.0-strategytester-gif 

  4. #34

    Default

    Quote Originally Posted by philippe07024 View Post
    Hello ppentz,

    I got quite impressive results with version 1.1 your EA. Good job!

    The EA works very well with a demo account with FXDD, however it generates errors with Alpari and FXCM demo accounts. It seems that is due to the lots of 0.01 generate errors. I tried with lots of 0.1 with 0.1 increments but results are not even close to the one obtained with 0.01 lots.
    Any recommendation to make your EA work better with 0.1 lots?

    Philippe
    I just ran a backtest on Alpari but it seemed to be fine, I didn't get the 131 errors that you did. I manually changed the lot size and lot step values to 0.1 too, but it was still ok. I'm not sure why you're getting those errors.

  5. #35

    Default

    Quote Originally Posted by ppentz View Post
    I just ran a backtest on Alpari but it seemed to be fine, I didn't get the 131 errors that you did. I manually changed the lot size and lot step values to 0.1 too, but it was still ok. I'm not sure why you're getting those errors.
    I have just opened a new account with Alpari, downloaded their version of Metatrader and run the back test. I get the same errors.
    Here is the version of Metatrader I have downloaded:
    Attached Images Attached Images PentzParabolic v1.0-version-jpg 

  6. #36

    Default

    Quote Originally Posted by philippe07024 View Post
    I have just opened a new account with Alpari, downloaded their version of Metatrader and run the back test. I get the same errors.
    Here is the version of Metatrader I have downloaded:
    I ran my test on Alpari UK, not US. I can't imagine it would matter, but I'll try US to be sure.

  7. #37
    Junior Member
    Join Date
    Sep 2009
    Posts
    10

    Default

    Quote Originally Posted by ppentz View Post
    "Firstly, you should have used the StringSubstr() function to overcome the various prefixes and suffixes used by brokers." Can you give me an example? Not sure what you're referring to.

    There are many ways to do the same thing ... using the magic numbers for each of the pairs is one way of dealing with multiple concurrent pairs on one account.

    Paul
    Paul,

    Your code reads:

    if (Symbol() == "AUDCADm" || Symbol() == "AUDCAD") MagicNo = 1043001;
    //etc

    This doesn't address those brokers who use other prefixes or suffixes (eg AUDCADfx).

    Instead your code could read:

    if(StringFind(Symbol(),"AUDCAD",0)>=0 MagicNo=1043001;

    That aside, you don't even need all those different magic numbers in the first instance. You have conditions relating to open orders which read like this:

    if(OrderType()==OP_BUY && OrderMagicNumber()==MagicNo){//yadda}

    You just need to change them to read like this:

    if(OrderSymbol()==Symbol() && OrderType()==OP_BUY && OrderMagicNumber()==MagicNo){//yadda}

    It's just much better coding practice.

    What about the backtests though? How do you explain it blowing the account on the default settings?

  8. #38

    Default

    Quote Originally Posted by ppentz View Post
    I just ran a backtest on Alpari but it seemed to be fine, I didn't get the 131 errors that you did. I manually changed the lot size and lot step values to 0.1 too, but it was still ok. I'm not sure why you're getting those errors.
    Quote Originally Posted by ppentz View Post
    What errors are you seeing? It should work fine on Alpari, although I haven't tested it directly. I have a demo account so I'll try it.

    I have it running on a FXOpen demo account right now that is a mini account so it has default lot size of 0.1. So far the results have been good. It sounds like you manually set the LotSize and LotStep parameters to 0.1? What balance did the account have? What was the setting of the "FreeMarginMin" paramter?
    After checking, it seems that your EA does not work well with brokers which have minimum lots of 0.1 and require steps or 0.1.
    I checked on various demo accounts with Metatrader the values of:
    MarketInfo(Symbol(),MODE_MINLOT) Minimum permitted amount of a lot.
    MarketInfo(Symbol(),MODE_LOTSTEP) Step for changing lots.

    Backtesting from 12/13 to 12/17 (I am in Eastern time), EURUSD, H1, leaving all parameters to default in version 1.1 of your EA (including AutoLotSize to true) starting with $10K, I get:
    MINLOT: 0.1 and LOTSTEP: 0.1 for
    -FXCM. Net Profit: -$2,445.40, 22 trades, no error (besides error 1). Several errors 130 and 4051
    -FXOpen regular demo account (not mini). Net Profit: -$4,146.4, 22 trades, no error (besides error 1). Several errors 130
    MINLOT: 0.01 and LOTSTEP: 0.01 for
    -FXDD. Net Profit: $1,317.47, 20 trades, no error (besides error 1).
    -Alpari UK. Net Profit: $1,316.81, 21 trades, no error (besides error 1).
    MINLOT: 0.1 and LOTSTEP: 0.01 for
    -Alpari US. No trades. Several errors 131

  9. #39

    Default

    Quote Originally Posted by DonAdams View Post
    Paul,

    Your code reads:

    if (Symbol() == "AUDCADm" || Symbol() == "AUDCAD") MagicNo = 1043001;
    //etc

    This doesn't address those brokers who use other prefixes or suffixes (eg AUDCADfx).

    Instead your code could read:

    if(StringFind(Symbol(),"AUDCAD",0)>=0 MagicNo=1043001;

    That aside, you don't even need all those different magic numbers in the first instance. You have conditions relating to open orders which read like this:

    if(OrderType()==OP_BUY && OrderMagicNumber()==MagicNo){//yadda}

    You just need to change them to read like this:

    if(OrderSymbol()==Symbol() && OrderType()==OP_BUY && OrderMagicNumber()==MagicNo){//yadda}

    It's just much better coding practice.

    What about the backtests though? How do you explain it blowing the account on the default settings?
    Ah, gottcha, using the StringFind() function makes it more generic, it can live with any suffix. One question, do you really need both the OrderSymbol()==Symbol() and the OrderMagicNumber()==MagicNo parts? It just seems a little redundant to me.

    Where it's getting into trouble in the back tests is when the price oscillates. The price is going up so it opens Buys, but then the price heads back down. It responds by opening Sells, but the price reverses again and so on. There is an internal multiplier that is not a parameter that was set too high, so in this version (1.2) I have reduced it. That will help, but what it needs is different SAR settings so it doesn't react so quickly to price changes. And that's where optimizing comes into play. I've only optimized for about the last 60 days because I want it to be responsive to current conditions. I understand those historic conditions could return which is why I plan to optimize regularly and share the new set files.

    This version does not include the StringFind() change, but the next one will.

    Paul
    Attached Files Attached Files

  10. #40
    Junior Member
    Join Date
    Sep 2009
    Posts
    10

    Default

    Quote Originally Posted by ppentz View Post
    Ah, gottcha, using the StringFind() function makes it more generic, it can live with any suffix. One question, do you really need both the OrderSymbol()==Symbol() and the OrderMagicNumber()==MagicNo parts? It just seems a little redundant to me.
    The point I was trying to make is that you can do away with all of the different magic numbers completely and just assign it one magic number in Global Scope. Most people probably wouldn't ordinarily need to even use either the StringFind() or StringSubstr() functions within an EA. An example of an application where those functions are of use would be in preventing an EA from trading on non-allowed symbols or for use in trade copying EAs where the server account has different prefixes or suffixes to the slave account.

    When you select open orders in your EA, you need to select by both symbol and magic number if you scrap all the different magic numbers.

Tags for this Thread

10%, 100, 100 pips, alpari, alpari uk, analysis, backtest, backtesting, broker, brokers, change, check it out, closing, coding, comparison, demo, ea works, eas, eur, eurusd, ex4, expert, fifo, forex, forex trading, free, free ea, fxopen, gbpusd, generic, high, historical, home, indicator, indicators, learn, live, live account, long term, magic, main, manual, martingale, metatrader, metatrader4, mirror, money, mq4, mt4, nfa, online, pairs, parabolic sar, profit, profitable, real, sells, server, simple, slippage, small account, stop, stoploss, support, system, systems, technical analysis, test, thank you, time, tool, trader, trading, trading platform, trend, usd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •