1. Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)
    Dismiss Notice

Tested Test Simple Parabolic SAR EA Backtest 1,000 to 132,000 in 12 month

Discussion in 'Expert Advisor atau Robot Forex' started by fxgreen, 16 Dec 2019.

  1. fxgreen

    fxgreen Member Credit Hunter

    Equity
    Credit
    Ref Point
    Hi, All

    I try to backtest Parabolic SAR EA with EURUSD result not bad

    Original EA code
    https://www.mql5.com/en/code/23039
    https://www.mql5.com/en/code/download/23039/parabolic_sar_ea.mq5
    (anyone can try modify)

    I test with default setting with XM broker result is ok (good)
    but profits is not much, I need more money. I want to scale profits.

    So, I modify EA from Fix lot to Auto Risk Percent Lot
    by using standard class MoneyFixedMargin.mqh on MQL5
    I use to cut and paste code from EA using MoneyFixedMargin.mqh to replace Lot size calculate

    The first test result good on broker XM.com
    testing backtest EURUSD from 1 January this year to now (December)
    100 to 22,682
    500 to 101,005
    1000 to 132,655
    2000 to 164,358
    setting ar Risk 30% and all default setting from original

    The problem I try to another broker all backtest fail. it can not use with other broker success

    So, I test do optimization with EURUSDm broker Exness got a result (just 12 months this year)
    500 to 602,461
    1,000 to 793,616
    2,000 to 987,378

    However exness not good result it has to lose order continue 3 order (but optimize setting risk at 20% that still have a fund for trading) XM broker is a better result

    Problem EA is sensitive, all it can not copy setting to use with other brokers
    if you want to use other brokers you need to do optimization new one all again.

    I confirm each broker need to do a new one optimization.
    So, you need to optimize your own broker.

    if you share setting file .set best set from optimization result
    try share file OPT from optimization is better
    OPT file is collect all result of optimization

    (you can import file by click right on optimize result tab)
    (sorry my EA using on folder name \A3\ on Expert folder)

    from OPT file, How to choose optimization setting
    to choose LOW Drawdown only first and use NON-profits factor or high-profit factor.
    if high profits setting has high Drawdown do not use it.

    use low Drawdown is low risk
    use Blank profits factor is low risk (backtesting result is won all 100%)
    use high-profit factor is low risk (low loss)

    same all EA problem
    setting value EA for backtesting result better is can possible
    but future never know is still work good or not

    and it looks like all broker have chart data is a difference for all broker
    why all EA is faile when using different brokers.


    XM Global Limited
    IntLotOrRisk=1
    InpVolumeLotOrRisk=30
    InpLots=1
    InpStopLoss=50
    InpTakeProfit=50
    Inp_timeframe=30
    Inp_SAR_step=0.02
    Inp_SAR_maximum=0.2
    InpBarCurrent=1
    m_magic=82139559
    InpPrintLog=true


    Exness-MT5Trial
    IntLotOrRisk=1
    InpVolumeLotOrRisk=20
    InpLots=1
    InpStopLoss=69
    InpTakeProfit=98
    Inp_timeframe=32769
    Inp_SAR_step=0.33
    Inp_SAR_maximum=7.9
    InpBarCurrent=9
    m_magic=82139559
    InpPrintLog=true
     

    Attached Files:

    • Like Like x 1
  2. fxgreen

    fxgreen Member Credit Hunter

    Equity
    Credit
    Ref Point
    my setting file for Exness
    run optimization 36 hour
     

    Attached Files:

    • Like Like x 1
  3. traderxp

    traderxp New Member Credit Hunter

    Equity
    Credit
    Ref Point
    Hi
    Would you please upload the mt4 version
    So I can run few backrest on my platforms

    I have 3 platform I would like to test the ea on them

    Thanks alot for sharing mate ..
     
  4. blackking

    blackking Well-Known Member Credit Hunter

    Equity
    Credit
    Ref Point
    Parabolic SAR, this indicator to determine the trend uptrend or downtrend
    simple trade if three-dot appear above the price, sell, if appear below the price, its buy
     
  5. adriano delize

    adriano delize New Member

    Equity
    Credit
    Ref Point
    Desculpe eu não falar inglês, mas o minimo de negociações para você considerar uma otimização é de 100. 23 negociações é pouco para servir de base estatística. Pegue agora o mesmo set e coloque para rodar 2 anos antes do otimizado, se a curva mudar muito não está robusto o suficiente. Outro teste que você pode fazer é de otimizar até meados de 2019 apenas e rodar nos meses seguintes para ver como se sairia. Isso é o Out of sample de uma estratégia.
     
  6. jooo00000

    jooo00000 Member Credit Hunter

    Equity
    Credit
    Ref Point
    This forum is for FREE EA !!
     
  7. TradingForLiving

    TradingForLiving Member Credit Hunter

    Equity
    Credit
    Ref Point
    Everyone please read carefully. In first post has a link to download source code. So this EA totally it's free for you.
     
  8. fxgreen

    fxgreen Member Credit Hunter

    Equity
    Credit
    Ref Point
    I try to develop on MQL4 before but the result trade is very bad. So I change to develop on MQL5 is work better.
    Sorry no MT4 version
     
  9. kuposcar

    kuposcar New Member Credit Hunter

    Equity
    Credit
    Ref Point
    In Mql5, in EAs with fix stoploss, you can use this simple code for money managment,

    input double Fixed_Lots = 0.01;
    input bool Money_Management = true;
    input double Risk_Trading = 10;
    input double Minimum_Lots = 0.01;
    input double Maximum_Lots = 10;


    double vol;
    double Id_E0 = Risk_Trading / 100;
    double Gd_13;
    double Ii_C8 = log(SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_STEP))/ -2.30258509299405;
    if (Minimum_Lots <= SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN))
    {
    Gd_4 = SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MIN);
    }
    else
    {
    Gd_4 = Minimum_Lots;
    }
    Id_D0 = Gd_4;
    if (Maximum_Lots >= SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX))
    {
    Gd_4 = SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);
    }
    else
    {
    Gd_4 = Maximum_Lots;
    }
    Id_D8 = Gd_4;


    void OnTick()
    {


    Gd_13 = AccountInfoDouble(ACCOUNT_BALANCE) * AccountInfoInteger(ACCOUNT_LEVERAGE);
    Ld_98 = Gd_13 * Id_E0;
    if (Money_Management != true)
    {
    Ld_98 = Fixed_Lots;
    }
    vol = NormalizeDouble(Ld_98 / SymbolInfoDouble(Symbol(),SYMBOL_TRADE_CONTRACT_SIZE), Ii_C8);
    if (Id_D0 <= vol)
    {
    vol = vol;
    }
    else
    {
    vol = Id_D0;
    } // label 000000EB
    if (Id_D8 >= vol)
    {
    vol= vol;
    }
    else
    {
    vol = Id_D8;
    }
    }
     
  10. kuposcar

    kuposcar New Member Credit Hunter

    Equity
    Credit
    Ref Point
    MT5 backtest is much better than MT4
     
  11. kuposcar

    kuposcar New Member Credit Hunter

    Equity
    Credit
    Ref Point
    there are something in the code, because the lot change the kind of positions.
     
  12. fxgreen

    fxgreen Member Credit Hunter

    Equity
    Credit
    Ref Point

    What difference this calculate code difference with function MoneyFixedMargin.mqh
    I try to modify but still have warning error, anybody who can code please help to modify and fix it
     

    Attached Files:

  13. fxgreen

    fxgreen Member Credit Hunter

    Equity
    Credit
    Ref Point
    yes, MT5 is resulted better.
    I try to code on MT4 same condition trade but MT4 can not calculate like MT5
    Some setting on MT5 EA it is using multi timeframe, I test on M1 (1 minute) timeframe and working indicator on setting using 30 minute timeframe, on MT4 can not working well and can't backtest both timeframes

    if anyone would like to using on MT4 broker, try way copy trade, use EA on MT5 with demo account and copy trade to you MT4
     
  14. queer

    queer New Member Credit Hunter

    Equity
    Credit
    Ref Point
    5/5,
    This is my review for this thread:
    Erst einmal wünsche ich allen hier ein gesundes neues Jahr.....
    habe den EA auf ein XM Demo konto geladen und wir werden mal schauen was dabei raus kommt...... hat aber zw. Weihnachten und Neujahr ganz gut angefangen
     
  15. fxgreen

    fxgreen Member Credit Hunter

    Equity
    Credit
    Ref Point
    Hi,
    This test optimization I do on Exness.com , so for XM.com maybe need to new optimization
    try to use this SET file to optimization new value for XM.com broker
    try to run an optimization for 24 hours maybe open your computer to overnight
     

    Attached Files:

  16. jooo00000

    jooo00000 Member Credit Hunter

    Equity
    Credit
    Ref Point
    only mq5?

    Icmarkets set?
     
  17. Chefmac

    Chefmac New Member Credit Hunter

    Equity
    Credit
    Ref Point
    IC Markets set would be great!
     
  18. kiromu

    kiromu Member Credit Hunter

    Equity
    Credit
    Ref Point
    5/5,
    This is my review for this thread:
    Thank you!
     
  19. fxgreen

    fxgreen Member Credit Hunter

    Equity
    Credit
    Ref Point
    you can find any value for you broker by just run optimization overnight 24 hour
    try run on you real IC markets account

    the problem for IC market, look like broker setup for download backtest data not give to download all tick data just 30% tick download

    2020-01-22 07_44_22-Window.jpg 2020-01-22 07_44_53-Window.jpg 2020-01-22 07_45_06-Window.jpg 2020-01-22 07_45_38-Window.jpg
     
  20. fxgreen

    fxgreen Member Credit Hunter

    Equity
    Credit
    Ref Point
    remember all EA that Survives is good only when to start market at that time only but after that is possible not good start because EA profit enough to lose more

    Strategy Tester Report

    ICMarkets-Demo (Build 2280)
    Settings
    Expert: Parabolic SAR EA_ModifyLotRisk_v001
    Symbol: EURUSD
    Period: M1 (2019.01.01 - 2019.12.14)


    Inputs: IntLotOrRisk=1
    InpVolumeLotOrRisk=35
    InpLots=1
    InpStopLoss=111
    InpTakeProfit=67
    Inp_timeframe=32769
    Inp_SAR_step=1.21
    Inp_SAR_maximum=0.7
    InpBarCurrent=3
    m_magic=82139559
    InpPrintLog=true

    Broker: International Capital Markets Pty Ltd.
    Currency: USD
    Initial Deposit: 1 000.00
    Leverage: 1:500
    Results

    History Quality: 10%
    Bars: 356506 T
    Total Net Profit: 946 740.56 Balance Drawdown Absolute: 0.00 Equity Drawdown Absolute: 517.14
    Gross Profit: 1 399 304.56 Balance Drawdown Maximal: 236 432.00 (44.32%) Equity Drawdown Maximal: 462 452.00 (83.92%)
    Gross Loss: -452 564.00
     
  21. Chefmac

    Chefmac New Member Credit Hunter

    Equity
    Credit
    Ref Point
    fxgreen , thanks for testing and sharing!
     
  22. Chefmac

    Chefmac New Member Credit Hunter

    Equity
    Credit
    Ref Point
    fxgreen I was able to run it and use your setting, but they seem to be a bit odd.

    What does Inp_timeframe=32769 mean? Worktime frame? I attached a photo of my set.

    Also I cant see InpPrintLog=true .

    Thank you for your help
     

    Attached Files:

Share This Page