Get in touch with developers using Service Desk! - page 99

 
Mostafa Kian #:

hi i test my strategy in meta stertegy tester 5.

when i use ohlc , my take profit dont touch in correct number .for exmplay buy gold in 1900 tp 1902 but it take 1903 .every tick is ok but ohlc isnt ok

You buy at the Ask and sell at the Bid:

Forum on trading, automated trading systems and testing trading strategies

Entry point 41 pip difference

William Roeder, 2021.10.08 01:43

  1. It more likely you mean 41 points above.

    PIP, Point, or Tick are all different in general.
              What is a TICK? - MQL4 programming forum (2014)

  2. You buy at the Ask and sell at the Bid. Pending Buy Stop orders become market orders when hit and open at the Ask.

    1. Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid / OrderClosePrice reaches it. Using Ask±n, makes your SL shorter and your TP longer, by the spread. Don't you want the specified amount used in either direction?

    2. Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask / OrderClosePrice reaches it. To trigger close to a specific Bid price, add the average spread.
                MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25

    3. The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (control+O) → charts → Show ask line.)
      Most brokers with variable spreads widen considerably at end of day (5 PM ET) ± 30 minutes. My GBPJPY shows average spread = 26 points, but average maximum spread = 134 (your broker will be similar).


 

Hello, i have a big problem, every time i download mt4, it is automatically mt5 that downloads. What I want is not mt5, it is mt4, why does it happen automatically like this? Even I tried with other brokers, but always the same thing. i cannot open an account on mt4. / it is automatically opened on mt5 / Can someone help me please?

 
Sarah #:

Hello, i have a big problem, every time i download mt4, it is automatically mt5 that downloads. What I want is not mt5, it is mt4, why does it happen automatically like this? Even I tried with other brokers, but always the same thing. i cannot open an account on mt4. / it is automatically opened on mt5 / Can someone help me please?

Because the support of MT4 was stopped long time ago (yes, there will be new MT4 builds but for minor fixing only).
It means that we can download MT4 from the brokers' websites only.
 

Hi

Suddenly I got an error which I have not seen before. 

The end of the journal goes;   

Core 1- common synchronization competed

Tester- quality of analyzed history is 100%

Tester -cannot open tester chart 

Core 1 - connection closed


It takes quite some time after clicking start, much longer than before.

Then the stratregy tester window freezes wth a white screen only, not possible to edit or check anything.

I tried reinstall but problem is still there.



Br

Thomas

Visualize a Strategy in the MetaTrader 5 Tester
Visualize a Strategy in the MetaTrader 5 Tester
  • www.mql5.com
We all know the saying "Better to see once than hear a hundred times". You can read various books about Paris or Venice, but based on the mental images you wouldn't have the same feelings as on the evening walk in these fabulous cities. The advantage of visualization can easily be projected on any aspect of our lives, including work in the market, for example, the analysis of price on charts using indicators, and of course, the visualization of strategy testing. This article contains descriptions of all the visualization features of the MetaTrader 5 Strategy Tester.
Files:
MT5_2.png  70 kb
MT5_3.png  166 kb
 

I have noticed that SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE) gives the a wrong value in the MQL5 Strategy Tester while it gives the correct value when running the EA.

Has anyone come across this before? Is there a solution to this issue?

I will be grateful for any ideas.

 
jaya7838 # :

I have noticed that  SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE ) gives the a wrong value in the MQL5 Strategy Tester while it gives the correct value when running the EA.

Has anyone come across this before? Is there a solution to this issue?

I will be grateful for any ideas.

Can you confirm this? Please provide your MQL5 code. Provide terminal and operating system details:

Forum on trading, automated trading systems and testing trading strategies

Very Glitchy MetaTrader

Vladimir Karputov, 2021.03.16 04:20

If you have a question, first of all you should show the first three lines from the 'Journal' tab


(select these lines, copy to the clipboard and paste into the message using the button Code). It should look like this:

2021.03.16 05:13:07.133 Terminal        MetaTrader 5 x64 build 3003 started for MetaQuotes Software Corp.
2021.03.16 05:13:07.134 Terminal        Windows 10 build 19042, Intel Core i7-9750H  @ 2.60GHz, 26 / 31 Gb memory, 842 / 947 Gb disk, IE 11, UAC, GMT+2
2021.03.16 05:13:07.134 Terminal        C:\Users\barab\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075

Indicate on which symbol and on which server are you running the tests?

 
Vladimir Karputov #:

Can you confirm this? Please provide your MQL5 code. Provide terminal and operating system details:


Indicate on which symbol and on which server are you running the tests?

jaya7838 #:

I have noticed that SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE) gives the a wrong value in the MQL5 Strategy Tester while it gives the correct value when running the EA.

Has anyone come across this before? Is there a solution to this issue?

I will be grateful for any ideas.

Hi Valadimir,

Thank you for your prompt response.

Relevant Section of the code:

   double MinLots = SymbolInfoDouble(Pair[pIndex],SYMBOL_VOLUME_MIN);

   double AccountBalance = AccountInfoDouble(ACCOUNT_BALANCE);

   double TickValue = SymbolInfoDouble(Pair[pIndex],SYMBOL_TRADE_TICK_VALUE); 

   LotSize=NormalizeDouble(AccountBalance*RiskPerCent/100/(StopLoss/sPoint)/TickValue,2);

Here are the fist few lines from the Strategy Tester Journal:

2021.10.28 14:03:10.022               Tester   AUDJPY: history data begins from 2004.01.01 00:00
2021.10.28 14:03:10.511               Core 1   agent process started on 127.0.0.1:3000
2021.10.28 14:03:10.511               Core 1   connecting to 127.0.0.1:3000
2021.10.28 14:03:12.035               Core 1   connected
2021.10.28 14:03:12.051               Core 1   authorized (agent build 3091)
2021.10.28 14:03:12.066               Tester   AUDJPY,H4 (ForexTimeFXTM-Demo01): testing of Experts\Advisors\Current\Triple MA - RSI Algo (Multi Pair) V1.07.ex5 from 2011.06.12 00:00 to 2021.06.11 00:00

Please note that this is a multi pair EA running on a single chart.

As I said before the variable TickValue gives a wrong value when the Strategy tester is running. (Usually 100.0 for JPY pairs and 1.0 for other pairs)

But it gives the correct value when the EA is running normally.

I have tried running the tester on several symbols and had the same issue. My Broker is FXTM (Forex Time)

 
jaya7838 # :

Hi Valadimir,

Thank you for your prompt response.

Relevant Section of the code:

   double MinLots = SymbolInfoDouble(Pair[pIndex],SYMBOL_VOLUME_MIN);

   double AccountBalance = AccountInfoDouble(ACCOUNT_BALANCE);

   double TickValue = SymbolInfoDouble(Pair[pIndex],SYMBOL_TRADE_TICK_VALUE); 

   LotSize=NormalizeDouble(AccountBalance*RiskPerCent/100/(StopLoss/sPoint)/TickValue,2);

Here are the fist few lines from the Strategy Tester Journal:


Please note that this is a multi pair EA running on a single chart.

As I said before the variable TickValue gives a wrong value when the Strategy tester is running. (Usually 100.0 for JPY pairs and 1.0 for other pairs)

But it gives the correct value when the EA is running normally.

I have tried running the tester on several symbols and had the same issue. My Broker is FXTM (Forex Time)

Please provide some code that I can compile and run. Without a code and a detailed explanation, the chances of finding an error are close to −273

 
Vladimir Karputov #:

Please provide some code that I can compile and run. Without a code and a detailed explanation, the chances of finding an error are close to −273

Thank you, Vladimir

 

I created a simple EA to illustrate my problem, which is attached hereto. Please compare the Tick Values in the Strategy Tester journal and in the Alert window when the EA runs.

 

The former shows 100.0 for JPY pairs and 1.0  for others, whereas the latter shows the correct values for all the pairs.

 
jaya7838 # :

Thank you, Vladimir

 

I created a simple EA to illustrate my problem, which is attached hereto. Please compare the Tick Values in the Strategy Tester journal and in the Alert window when the EA runs.

 

The former shows 100.0 for JPY pairs and 1.0  for others, whereas the latter shows the correct values for all the pairs.

When testing, you must make sure that the symbols are in the "Market Watch" window.

Example:

int OnInit()
  {
//--- create timer
   EventSetTimer(1);
   TotPairs = 9;
   ArrayResize(Pair,TotPairs);
   Pair[0] = "NZDCAD";
   Pair[1] = "XAUUSD";
   Pair[2] = "AUDCHF";
   Pair[3] = "EURJPY";
   Pair[4] = "AUDUSD";
   Pair[5] = "CHFJPY";
   Pair[6] = "EURUSD";
   Pair[7] = "NZDJPY";
   Pair[8] = "AUDJPY";
//---
   int size=ArraySize(Pair);
   for(int i=0; i<size; i++)
     {
      SymbolSelect(Pair[i],true);
     }
//---
   return(INIT_SUCCEEDED);
  }


and log:

2021.10.28 15:44:07.996 NZDCAD: history synchronization started
2021.10.28 15:44:07.997 NZDCAD: load 27 bytes of history data to synchronize in 0:00:00.000
2021.10.28 15:44:07.997 NZDCAD: history synchronized from 2015.01.02 to 2021.10.26
2021.10.28 15:44:07.998 USDCAD: symbol to be synchronized
2021.10.28 15:44:08.000 USDCAD: symbol synchronized, 3720 bytes of symbol info received
2021.10.28 15:44:08.000 USDCAD: history synchronization started
2021.10.28 15:44:08.001 USDCAD: load 27 bytes of history data to synchronize in 0:00:00.000
2021.10.28 15:44:08.001 USDCAD: history synchronized from 2015.01.02 to 2021.10.26
2021.10.28 15:44:08.002 2021.02.11 00:00:01   Alert: NZDCAD- Tick Value; 0.79
2021.10.28 15:44:08.702 XAUUSD: history synchronization started
2021.10.28 15:44:08.704 XAUUSD: load 27 bytes of history data to synchronize in 0:00:00.000
2021.10.28 15:44:08.704 XAUUSD: history synchronized from 2017.01.03 to 2021.10.13
2021.10.28 15:44:08.705 2021.02.11 00:00:03   Alert: XAUUSD- Tick Value; 0.10
2021.10.28 15:44:09.393 AUDCHF: history synchronization started
2021.10.28 15:44:09.395 AUDCHF: load 27 bytes of history data to synchronize in 0:00:00.000
2021.10.28 15:44:09.395 AUDCHF: history synchronized from 2015.01.02 to 2021.10.26
2021.10.28 15:44:09.396 USDCHF: symbol to be synchronized
2021.10.28 15:44:09.397 USDCHF: symbol synchronized, 3720 bytes of symbol info received
2021.10.28 15:44:09.397 USDCHF: history synchronization started
2021.10.28 15:44:09.398 USDCHF: load 27 bytes of history data to synchronize in 0:00:00.000
2021.10.28 15:44:09.398 USDCHF: history synchronized from 2015.01.02 to 2021.10.26
2021.10.28 15:44:09.399 2021.02.11 00:00:05   Alert: AUDCHF- Tick Value; 1.12
2021.10.28 15:44:10.000 EURJPY: history synchronization started
2021.10.28 15:44:10.003 EURJPY: load 27 bytes of history data to synchronize in 0:00:00.001
2021.10.28 15:44:10.003 EURJPY: history synchronized from 2015.01.02 to 2021.10.26
2021.10.28 15:44:10.004 USDJPY: symbol to be synchronized
2021.10.28 15:44:10.004 USDJPY: symbol synchronized, 3720 bytes of symbol info received
2021.10.28 15:44:10.004 USDJPY: history synchronization started
2021.10.28 15:44:10.006 USDJPY: load 27 bytes of history data to synchronize in 0:00:00.000
2021.10.28 15:44:10.006 USDJPY: history synchronized from 2015.01.02 to 2021.10.26
2021.10.28 15:44:10.007 2021.02.11 00:00:07   Alert: EURJPY- Tick Value; 0.96
2021.10.28 15:44:10.869 AUDUSD: history synchronization started
2021.10.28 15:44:10.871 AUDUSD: load 27 bytes of history data to synchronize in 0:00:00.001
2021.10.28 15:44:10.871 AUDUSD: history synchronized from 2015.01.02 to 2021.10.26
2021.10.28 15:44:10.872 2021.02.11 00:00:09   Alert: AUDUSD- Tick Value; 1.00
2021.10.28 15:44:11.279 CHFJPY: history synchronization started
2021.10.28 15:44:11.281 CHFJPY: load 27 bytes of history data to synchronize in 0:00:00.000
2021.10.28 15:44:11.281 CHFJPY: history synchronized from 2015.01.02 to 2021.10.26
2021.10.28 15:44:11.282 2021.02.11 00:00:11   Alert: CHFJPY- Tick Value; 0.96
2021.10.28 15:44:11.682 2021.02.11 00:00:13   Alert: EURUSD- Tick Value; 1.00
2021.10.28 15:44:11.683 NZDJPY: history synchronization started
2021.10.28 15:44:11.685 NZDJPY: load 27 bytes of history data to synchronize in 0:00:00.000
2021.10.28 15:44:11.685 NZDJPY: history synchronized from 2019.01.02 to 2021.10.13
2021.10.28 15:44:11.686 2021.02.11 00:00:15   Alert: NZDJPY- Tick Value; 0.96
2021.10.28 15:44:12.087 AUDJPY: history synchronization started
2021.10.28 15:44:12.090 AUDJPY: load 27 bytes of history data to synchronize in 0:00:00.000
2021.10.28 15:44:12.090 AUDJPY: history synchronized from 2015.01.02 to 2021.10.26
2021.10.28 15:44:12.090 2021.02.11 00:00:17   Alert: AUDJPY- Tick Value; 0.96
2021.10.28 15:47:05.897 2021.02.11 00:00:19   Alert: NZDCAD- Tick Value; 0.79
2021.10.28 15:47:05.897 2021.02.11 00:00:21   Alert: XAUUSD- Tick Value; 0.10
2021.10.28 15:47:05.897 2021.02.11 00:00:23   Alert: AUDCHF- Tick Value; 1.12
2021.10.28 15:47:05.897 2021.02.11 00:00:25   Alert: EURJPY- Tick Value; 0.96
2021.10.28 15:47:05.897 2021.02.11 00:00:27   Alert: AUDUSD- Tick Value; 1.00
2021.10.28 15:47:05.897 2021.02.11 00:00:29   Alert: CHFJPY- Tick Value; 0.96
2021.10.28 15:47:05.897 2021.02.11 00:00:31   Alert: EURUSD- Tick Value; 1.00
2021.10.28 15:47:05.897 2021.02.11 00:00:33   Alert: NZDJPY- Tick Value; 0.96
2021.10.28 15:47:05.897 2021.02.11 00:00:35   Alert: AUDJPY- Tick Value; 0.96
Reason: