Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 33
 3 Attachment(s)    

Thread: Correlation Martingale EA

  1. #11
    Junior Member
    Join Date
    Jul 2009
    Posts
    13

    Default

    Hi Funywoo
    The EA did well on the first set and then open and close immediately till the end of the account.
    Any Idea?
    Izak

  2. #12
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by izak View Post
    Hi Funywoo
    The EA did well on the first set and then open and close immediately till the end of the account.
    Any Idea?
    Izak
    Hi izak,

    I don't get such issue on Broco Trader.

    I have not found what could be the problem in the code. I will try to rewrite the code later.

  3. #13
    Member
    Join Date
    Jan 2009
    Location
    France
    Posts
    125

    Default

    Hi all
    I'm very happy to join you you and my very old buddy funyoo
    I like very much the correlation EA but I suggest some improvements:
    - first in my opinion it would be better the EA opens depending the EURCHF trend.
    if the EURCHF price is above the MA , the EA opens 2 buys.
    if the EURCHF price is under , the EA opens 2 sells.
    so if the trend EURCHF is strong, the target is reached faster...
    - secondly I thought the EA logic was buy sell buy sell etc..
    it seems no...if the first orders are buy buy , the others are sell sell sell sell ..... is it correct like that ?
    - finally I'd like a function StopTradingAfterTarget to stop the EA if needed
    There is another issue: sometimes all orders don't close all before the opening of the following cycle.
    Maybe an improvement in the code ?
    I think really this EA can be great : today I scored 3 % !
    I'will post my settings when the issue of the orders close will be corrected.
    Thank you funyoo for your job.
    Last edited by madscalp; 02-10-2010 at 15:27.

  4. #14
    Member
    Join Date
    Jan 2009
    Location
    France
    Posts
    125

    Default

    Hi funyoo
    After some days of demo, finally I realize the logic buy sell sell sell ... is good.
    Maybe an option to start the trade with the trend of EURCHF ?
    With a 5 000 $ demo account , i set 0.2 lot for EURUSD and 0.3 lot for USDCHF with multiplier 1.333 and 30 mn delayminutes.
    The results are awesome - it's easy to get 2-3 % profit per day- but sometimes after target there is an order that doesn't close ( generally one of first buys ). That happens always when there is a strong volatility.
    The code to close all orders is :
    if(totalprofit>=target){closebuy(symbol1);closebuy (symbol2);if(onlybuy==false){closesell(symbol1);cl osesell(symbol2);}}
    It's possible with the volatility that the totalprofit varies too fast and prevents the close of an order. Of course, if an order persists, it's dramatic.
    Do you see, funyoo, an improvement to be sure that all orders are closed before the beginning of the following trade.
    A StopTradingAfterTarget function could be useful too.
    Many thanks.

  5. #15

    Default

    yeah madscalp,

    u r puttin it on what timeframe? 1 hour? i tried the ea on 5k account...made bout 2k demo in 1 week then in 2 days lost 5k. i will try your settings. thanks.

  6. #16
    Member
    Join Date
    Jan 2009
    Location
    France
    Posts
    125

    Default

    Quote Originally Posted by fxprotrader View Post
    yeah madscalp,

    u r puttin it on what timeframe? 1 hour? i tried the ea on 5k account...made bout 2k demo in 1 week then in 2 days lost 5k. i will try your settings. thanks.
    Hi fxprotrader,
    Timeframe is not important ; in my opinion , we need safe settings and a weak target ( I set only $ 20 )
    From my tests, I made about 6 trades per day ie $ 120...depending the market conditions of course.
    I'm waiting for a safe close of the pending orders ( it's not the case yet when there is volatility), a StopTradingAfterTarget to stop trading if needed ( London close ) and a trading open depending the EURCHF trend.
    If EURCHF is uptrend, it's better first EURUSD-USDCHF buy-buy then sell-sell -sell-sell...
    if EURCHF downtrend, EURUSD-USDCHF sell-sell then buy-buy-buy-buy.....
    When there is volatility, it's difficult to reach exactly the set target but it's imperative that all orders be closed before the following cycle...
    After these improvements, we'll have the perfect system ......

  7. #17
    Junior Member
    Join Date
    Sep 2009
    Posts
    14

    Default

    Quote Originally Posted by Luther_Blissett View Post
    why not just trade eurchf? Because that's effectively what it is doing.
    I've looked into this a lot. If you compare the cross pair value(EC) to the calculated value of EU and UC, you find a mismatch in price of up to 30 pips. Out of balance values usually return to a difference of 0. I haven't tested for cointegration, but expect that this is a viable market neutral strategy.

    The attached chart shows the difference in price on an hourly scale for the last couple of years.

    Dan
    Attached Images Attached Images Correlation Martingale EA-eurchfcrosspairdivergence-jpg 

  8. #18
    Member
    Join Date
    Jan 2009
    Location
    France
    Posts
    125

    Default

    Hi dbrown
    It's exactly this mismatch that makes the system profitable.
    As it's a martingale , we have to look for safe settings but if the target is reasonable, it's working fine.
    The problem is that there is no possibility of backtest
    Thanks for your contribution.
    Last edited by madscalp; 02-13-2010 at 16:04.

  9. #19
    Junior Member
    Join Date
    Sep 2009
    Posts
    14

    Default

    Quote Originally Posted by madscalp View Post
    Hi dbrown
    It's exactly this mismatch that makes the system profitable.
    As it's a martingale , we have to look for safe settings but if the target is reasonable, it's working fine.
    The problem is that there is no possibility of backtest
    MetaTrader isn't very good with backtesting. MetaTrader data sucks! It has many large gaps in it that can skew the data.

    I have my own framework I wrote that aligns/fixes the data. One thing I've learned is that if your data has problems, so will your system. I currently, use it to test systems like this one. I haven't looked at this metatrader program, does it check for this out of balance condition? If so the next question is how will the imbalance correct itself? Does EU go up or UC go down or many various combinations of moves on the two.

    Dan

  10. #20
    Member
    Join Date
    Jan 2009
    Location
    France
    Posts
    125

    Default

    Quote Originally Posted by dbrown View Post
    MetaTrader isn't very good with backtesting. MetaTrader data sucks! It has many large gaps in it that can skew the data.

    I have my own framework I wrote that aligns/fixes the data. One thing I've learned is that if your data has problems, so will your system. I currently, use it to test systems like this one. I haven't looked at this metatrader program, does it check for this out of balance condition? If so the next question is how will the imbalance correct itself? Does EU go up or UC go down or many various combinations of moves on the two.

    Dan
    I know nothing that can backtest two pairs together...certainly no MT4
    Otherwise I think we need to consider the combinations of EU and UC.
    It seems the logic 2 buys then 2 sells 2 sells ....is correct.
    Next week I'm going to try 2 buys 2 buys 2 buys .
    As they are mirror pairs, it's important that simultaneous orders are same direction for each pair.

Similar Threads

  1. Correlation between oil and USDCAD
    By fxtester in forum Technical analysis
    Replies: 0
    Last Post: 12-17-2015, 13:23
  2. Correlation Martingale EA
    By funyoo in forum Expert advisors live statements
    Replies: 1
    Last Post: 07-22-2013, 23:34
  3. Neg Correlation EA
    By Lordvader in forum Ideas for expert advisors
    Replies: 10
    Last Post: 01-06-2011, 19:41
  4. Correlation Martingale EA
    By funyoo in forum Expert advisors backtesting
    Replies: 0
    Last Post: 01-27-2010, 19:30

Tags for this Thread

average, backtest, backtesting, broker, color, correlation, demo, divergence, ecn, eur, eur/usd, eurusd, free, hours, indicator, martingale, metatrader, mirror, mt4, profit, profitable, scalping, sells, spread, stop, strategy, system, systems, time, tool, trader, trading, 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
  •