Jump to content
  • 0

MT4 platform strategy tester incorrect currency spread on non trading days


Guest kirc

Question

Hi,

 

I am currently using MT4 platform provided by IG. All seems well except for one problem which was consistently observed.

 

I am using MT4 expert trader to back test strategy on EURO/USD currency pair. I noticed that when i use strategy tester during the trading days (Mon - Fri), i was able to get accurate simulation on the trades with the correct spread (0.6 - 0.8). However, if i were to run the strategy tester during non trading days, i was getting false spread as high as 30 - 50 pips.  This greatly affected the effectiveness of using strategy tester during non trading days. 

 

I tried to adjust my expert trader code to close the trades at "adjusted Ask/bid" prices, unfortunately, the  error : "EURUSD,M1: OrderClose error 138" occurred and no trades could be closed properly due to the wrong quotes on currency spread. 

 

Attached a figure which details the incorrect spread (eg 50 pips) instead of the usual IG spread (6-8 pips)

 



 

 

Is this a known problem in the system? Anyone knows of a workaround?

Link to comment

4 answers to this question

Recommended Posts

Hi Tim,

 

Actually what i am trying to highlight here is that the data feed from MT4 on the currency pair EURO/USD appears to be wrong during the non trading days. I am trading on mini forex (0.1 contract).

 

In my previous screenshot which was captured from http://www.ig.com/sg/ig-forex/eur-usd (IG webpage) , the currency spread quote from IG MT data centre was 50 pips.  Now today, if you visit the website again on non trading days, the currency spread becomes 46 (please refer to the Sell and Buy prices). I attach the screenshot taken from same IG website for your reference.

1stOct2016.jpg

 

When running strategy tester on non trading days, none of my trades will be profitable based on the spread value of 46 as shown above. Is this expected?  

Link to comment

Here's the corresponding screenshot of the live quote prices for ASK and BID on EURO/USD on an active trading day. Apparently, the spread is correct (6 pip points, 5 decimal).  On non trading days, this goes up to 40-50 pip points as indicated in my earlier screenshots. Is this a technical issue?

 



 

 

Link to comment

Hi 

 

Thanks for sharing the screenshots. Given the market is closed there will be technically be no price at all given the market is not trading and so the spread value of 50 is simply a value that we have set just for illustrative purposes so charts can be viewed on the weekend.

 

I hope that helps and if there is antyhing else you would like me to clarify then please let me know and I will be glad to help.

Link to comment

Hi 

 

Welcome to the IG community!

 

The error you are referring to  is the strategy is trying to close a trade when the market is closed and so a 'Requote' related error should be seen.

 

The strategy I assume is triggering to do this because of the spreads being put to a wider level and so it is seeing this as a trading opportunity. With that in mind a solution if this was during trading days would be to use the RefreshRates function, however this would have no impact given the market is closed. I have looked into a number of other sources that suggest this may be related to the code itself. With that in mind I would be inclined to suggest checking the metaquotes coding forum that will be able to shed some light on this error.

 

MetaQuotes - MT4 Tech Forum

 

I hope that helps!

 

 

 

 

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • General Statistics

    • Total Topics
      21,192
    • Total Posts
      90,725
    • Total Members
      41,301
    • Most Online
      7,522
      10/06/21 10:53

    Newest Member
    HAITUNJING
    Joined 30/01/23 15:00
  • Posts

    • Crude declines make little difference for FTSE oil & gas producers, with the long-term view remaining bullish for energy Source: Bloomberg   Commodities Petroleum Petroleum industry Brent Crude Gas Market trend  Joshua Mahony | Senior Market Analyst, London | Publication date: Monday 30 January 2023  Crude declines see Brent lose 34% Crude oil has suffered substantial losses over the course of the past year, with brent currently trading 34% below the March 2022 peak of $131.51. This decline represents grounds for optimism on the inflation-front, with headline CPI sliding lower across Europe and the US. However, traders continue to wonder whether this move will represent the top for the market or simply a temporary pullback within a long-term uptrend. Key considerations for the bulls include the re-emergence of Chinese economic activity as Covid restrictions are withdrawn, set against the risk of declining demand as recessionary pressures take hold. Looking at the monthly Brent crude chart below, we can see that this current month looks to be closing out in a doji candle, marking a second consecutive month of indecision. Meanwhile, the stochastic oscillator appears to be tightening, signalling the potential for a bullish shift in momentum before too long. With price currently trading around the 76.4% Fibonacci support level, the bulls will hope that the long-term uptrend will soon kick back into play. Source: ProRealTime SPR back down to multi-decade lows Another aspect to consider comes from the US, who have been drawing down their strategic petroleum reserve in a bid to support prices as OPEC restrict output. That decline in reserves can only last so long, with current levels back down to the lowest point since 1983. Recent comments have signalled that the US could move to instead seek to top-up their reserves around the $70 mark. Could a shift from supplier to consumer help tip sentiment back in favour of the bulls? FTSE oil & gas producers outperform One interesting area of outperformance has been the relative strength of oil producing stocks despite this decline in crude prices. Thus far, we have largely seen producers continue their ascent, with the volatility in oil and gas prices doing little to stifle sentiment. However, the chart below highlights how the FTSE 350 oil & gas producers sector essentially provides a more stable play on energy prices, with the stocks largely reflecting the underlying trend without necessarily seeing the same major swings that can occur for crude. The pullback we have seen in Brent (blue line) thus brings the total gains over the past two-years down to the area seen for FTSE 350 producers. For now, the uptrend remains in play for the sector, thus highlighting the belief that this recent pullback in energy prices serves to reflect a reversion back into the mean uptrend. With that in mind, the weakness seen in energy prices, and consolidation in FTSE oil & gas stocks, is deemed a potential precursor to another move higher to continue the long-term uptrend. Source: ProRealTime
    • EUR/USD has been a consistent performer over recent months, and IG analyst Joshua Mahony expects to see further gains in a week that is dominated by central banks. Josh looks at a long position, with a stop-loss at 1.0830 and target of 1.1040. He also looks back at the recent USD/JPY, aluminium and USD/CAD trades.  Joshua Mahony | Senior Market Analyst, London | Publication date: Monday 30 January 2023        
    • EUR/USD and EUR/GBP/USD appreciate while GBP/USD range trades Outlook on EUR/USD, EUR/GBP and GBP/USD ahead of this week’s Fed, ECB and BoE rate decisions.  Axel Rudolph FSTA | Senior Financial Analyst, London | Publication date: Monday 30 January 2023  EUR/USD recovers from last week’s low EUR/USD is seen bouncing off Friday’s low at $1.0838 ahead of this week’s plethora of central bank meetings by the likes of the US Federal Reserve (Fed) which is expected to hike its rates by 25-basis points, the European Central Bank (ECB) and the Bank of England (BoE) which are likely to raise their rates by 50-basis points (bps) respectively. The currency pair thus remains on track to reach the late April 2022 high and the 50% retracement of the 2021 to 2022 descent at $1.0936 to $1.094 while it stays above Friday’s $1.0838 low on a daily chart closing basis. A drop through $1.0838 would engage the mid-January $1.0766 low. While above it, and the mid- to late-December highs at $1.0736 to $1.0715, the medium-term uptrends remain intact. Above $1.094 lies the psychological $1.10 mark. Further support can be found around $1.0663 to $1.0658, the 16 to 28 December highs. Source: IT-Finance.com EUR/GBP bounces off December-to-January uptrend line EUR/GBP revisited but then bounced off its December-to-January uptrend line at £0.8763 while awaiting Thursday’s ECB and BoE rate decisions, with both central banks expected to hike rates by 50 bps. While £0.8763 underpins, the £0.8828 November peak as well as the £0.8834 - 22 December high - will be back in play, above which sits more significant resistance which can be spotted between the December and current January highs at £0.8877 to £0.8897. Only a slip through £0.8763 would engage the 55-day simple moving average (SMA) at £0.8735 and current January low at £0.8722. If slipped through, the 23 November high and 19 December low at £0.8701 to £0.8691 could once again be reached. Further down sits the 28 November high at £0.8676. Source: IT-Finance.com GBP/USD continues to range trade below its $1.2446 December high GBP/USD’s September advance from its $1.0350 all-time low struggled to overcome its December high at $1.2446 early last week and has been trading in a sideways trading range below this high ever since while awaiting Thursday’s UK central bank decision. This is not to say that the cross might not eventually rise to above its December and January highs at $1.2446 to $1.2448, provided that the 24 January low at $1.2263 doesn’t give way.mWere this to happen, the 9 January high at $1.221 may be reached. A rise and daily chart close above last week’s $1.2448 high would engage the minor psychological $1.2500 mark, above which the 7 June 2022 high can be found at $1.2599. Source: IT-Finance.com
×
×
  • Create New...