fabimor waylen nardoo

0 views
Skip to first unread message

Chiquita Palafox

unread,
Aug 2, 2024, 11:11:47 PM8/2/24
to marphaphoso

MetaTrader 5 Strategy Tester automatically determines the number of physical cores and installs the appropriate number of tester agents. A default password is set to all agents: MetaTester. All agents are available in the local network at the same IP address, while each is assigned a separate port. You can specify other port numbers and change the passwords: these settings will not affect you access to the MQL5 Cloud Network.

You can close the MetaTrader 5 Agents Manager window: the agents are already running as services. To edit the settings, run MetaTrader 5 Strategy Tester from the Start menu or from the desktop shortcut.

In short (sorry for pun), you're putting two order with the same conditions, wich are filled in one bar. So that's emulates a situation, which sometimes happens with real broker. At first, long-position is filled, so you get BTC for 100k usd, then the second order says: 'I'd like to be in deficit of BTC in 100k', for that strategy tester sells your BTC for 100k and sells 100k more to make 'short' position.

This is huge and well-known bug in TradingView backtester. Whenever strategy.close condition aligns with strategy.entry condition (so one trade is closed at the same time as next one is opened), some very very ugly entry is added to List of Trades - a trade is entered with a signal "Close entry(s) order..." ??? It doesn't even make sense.

Entries like this are included in backtest calculation, therefore destroying it completely. Sometimes they are improving backtest results, sometimes they are making them worse - but all the time they are not correct.

I had this same problem a few months ago when using a HP ryzen 5 tower and just thought the computer simply wasn't powerful enough. what would happen is as soon as i click start on the test, the memory (ram used) flew straight up too 95+% which would cause the computer to freeze, crash, ultimately stop working. So I did the logical thing.. i upgraded and spent 2k+ on a custom tower with a good spec, I should mention that my old tower had 8gb of ram, my new one has 32gb of ram so it thought the memory used would still be high but wouldn't consume the whole 32gb so wouldn't freeze. I WAS WRONG!!

I'm testing every tick with no more than 5000 combinations which in my opinion is not alot. I know every tick is alot more precise so naturally will be a larger task but what I don't understand is why the ram is still using 95+% even thought its 4x bigger.

I wish i could speak to mt5/mql5 tech support directly as id love to know the reason why this is happening because from where i stand, the testing function does not work effectively unless you spend 5k a month which is a shame.

with the computer? ive had the pc from new (custom built) for 3 weeks, ive had a computer shop look at it and the machine has zero faults, this has got to be something to do with mql5 system and how the strategy tester consumes memory for testing.

but if i enable the cloud server, click start and then when it starts processing the combinations i then disable the cloud server, my test will carry on ( just using my local computer processors) and computer wont struggle.. i find this odd

If the person will use the code (EA for example) with Metatrader so he should accept everything related to Metatrader (because it is money, and money is in his trading account).
But if the person/programmer does not care about his code and asking to improve Metatrader other than to improve/fix his code to be compatible with Metatrader and with his computer configuration - so it is his problem (because it is his money).

thanks for the comments guys, okay so it looks like a ossible RAM issue, ill have a look at purchasing more but it seems to be programmed to just use every bit of processing power your computer has.

something interesting i found shortly after i made this forum is that i would turn on the cloud for testing and it would run fine so then what i did is turn the cloud on, started running the test and then whilst it was still testing i then just switched the cloud server off meaning all the processing power then switched back over to my local cores and had no crash?

possibility that mt5 maybe programmes it so your computer doesnt test to the best ability if your not using there cloud service / spending money which they make $$$$ from?

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.

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.

In my previous screenshot which was captured from -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.

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?

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.

Spread bets and CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage. 69% of retail investor accounts lose money when trading spread bets and CFDs with this provider. You should consider whether you understand how spread bets and CFDs work, and whether you can afford to take the high risk of losing your money. Professional clients can lose more than they deposit. All trading involves risk.

The value of shares, ETFs and ETCs bought through a share dealing account, a stocks and shares ISA or a SIPP can fall as well as rise, which could mean getting back less than you originally put in. Past performance is no guarantee of future results.

CFD accounts provided by IG Markets Ltd, spread betting provided by IG Index Ltd and share dealing and stocks and shares ISA accounts provided by IG Trading and Investments Ltd. IG is a trading name of IG Markets Ltd (a company registered in England and Wales under number 04008957), IG Index Ltd (a company registered in England and Wales under number 01190902) and IG Trading and Investments Ltd (a company registered in England and Wales under number 11628764). Registered address at Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. IG Markets Ltd (Register number 195355), IG Index Ltd (Register number 114059) and IG Trading and Investments Ltd (Register number 944492) are authorised and regulated by the Financial Conduct Authority.

The information on this site is not directed at residents of the United States, Belgium or any particular country outside the UK and is not intended for distribution to, or use by, any person in any country or jurisdiction where such distribution or use would be contrary to local law or regulation.

The List ofTrades tabprovides a granular look at the trades simulated by a strategy withessential information, including the date and time of execution, thetype of order used (entry or exit), the number ofcontracts/shares/lots/units traded, and the price, as well as some keytrade performance metrics.

Notice!The maximum amount of intrabars that a script can request is 200,000.Some symbols with lengthier history may not have full intrabar coveragefor their beginning chart bars with this limitation, meaning thatsimulated trades on those bars will not be affected by the barmagnifier.

Market orders are the most basic type of orders. They command a strategyto buy or sell a security as soon as possible, regardless of the price.Consequently, they always execute on the next available price tick. Bydefault, all strategy.*() functions that generate orders specificallyproduce market orders.

The following script simulates a long market order when the bar_indexis divisible by 2 * cycleLength. Otherwise, it simulates a shortmarket order when the bar_index is divisible by cycleLength,resulting in a strategy with alternating long and short trades onceevery cycleLength bars:

To simulate limit orders in a script, pass a price value to an orderplacement command with a limit parameter. The following example placesa limit order 800 ticks below the bar close 100 bars before thelast_bar_index:

Note how the script placed the label and started the line several barsbefore the trade. As long as the price remained above the limitPricevalue, the order could not fill. Once the market price reached thelimit, the strategy executed the trade mid-bar. If we had set thelimitPrice to 800 ticks above the bar close rather than below, theorder would fill immediately since the price is already at a bettervalue:

c01484d022
Reply all
Reply to author
Forward
0 new messages