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. Pending Buy Stop orders become market orders when hit and open at the Ask.
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?
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
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?
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.
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.
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 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:
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?
Here are the fist few lines from the Strategy Tester Journal:
2021.10.2814:03:10.022 Tester AUDJPY: history data begins from 2004.01.0100:002021.10.2814:03:10.511 Core 1 agent process started on 127.0.0.1:30002021.10.2814:03:10.511 Core 1 connecting to 127.0.0.1:30002021.10.2814:03:12.035 Core 1 connected
2021.10.2814:03:12.051 Core 1 authorized (agent build 3091)
2021.10.2814: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.1200:00 to 2021.06.1100: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)
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.
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.
2021.10.2815:44:07.996 NZDCAD: history synchronization started
2021.10.2815:44:07.997 NZDCAD: load 27 bytes of history data to synchronize in0:00:00.0002021.10.2815:44:07.997 NZDCAD: history synchronized from2015.01.02 to 2021.10.262021.10.2815:44:07.998 USDCAD: symbol to be synchronized
2021.10.2815:44:08.000 USDCAD: symbol synchronized, 3720 bytes of symbol info received
2021.10.2815:44:08.000 USDCAD: history synchronization started
2021.10.2815:44:08.001 USDCAD: load 27 bytes of history data to synchronize in0:00:00.0002021.10.2815:44:08.001 USDCAD: history synchronized from2015.01.02 to 2021.10.262021.10.2815:44:08.0022021.02.1100:00:01 Alert: NZDCAD- Tick Value; 0.792021.10.2815:44:08.702 XAUUSD: history synchronization started
2021.10.2815:44:08.704 XAUUSD: load 27 bytes of history data to synchronize in0:00:00.0002021.10.2815:44:08.704 XAUUSD: history synchronized from2017.01.03 to 2021.10.132021.10.2815:44:08.7052021.02.1100:00:03 Alert: XAUUSD- Tick Value; 0.102021.10.2815:44:09.393 AUDCHF: history synchronization started
2021.10.2815:44:09.395 AUDCHF: load 27 bytes of history data to synchronize in0:00:00.0002021.10.2815:44:09.395 AUDCHF: history synchronized from2015.01.02 to 2021.10.262021.10.2815:44:09.396 USDCHF: symbol to be synchronized
2021.10.2815:44:09.397 USDCHF: symbol synchronized, 3720 bytes of symbol info received
2021.10.2815:44:09.397 USDCHF: history synchronization started
2021.10.2815:44:09.398 USDCHF: load 27 bytes of history data to synchronize in0:00:00.0002021.10.2815:44:09.398 USDCHF: history synchronized from2015.01.02 to 2021.10.262021.10.2815:44:09.3992021.02.1100:00:05 Alert: AUDCHF- Tick Value; 1.122021.10.2815:44:10.000 EURJPY: history synchronization started
2021.10.2815:44:10.003 EURJPY: load 27 bytes of history data to synchronize in0:00:00.0012021.10.2815:44:10.003 EURJPY: history synchronized from2015.01.02 to 2021.10.262021.10.2815:44:10.004 USDJPY: symbol to be synchronized
2021.10.2815:44:10.004 USDJPY: symbol synchronized, 3720 bytes of symbol info received
2021.10.2815:44:10.004 USDJPY: history synchronization started
2021.10.2815:44:10.006 USDJPY: load 27 bytes of history data to synchronize in0:00:00.0002021.10.2815:44:10.006 USDJPY: history synchronized from2015.01.02 to 2021.10.262021.10.2815:44:10.0072021.02.1100:00:07 Alert: EURJPY- Tick Value; 0.962021.10.2815:44:10.869 AUDUSD: history synchronization started
2021.10.2815:44:10.871 AUDUSD: load 27 bytes of history data to synchronize in0:00:00.0012021.10.2815:44:10.871 AUDUSD: history synchronized from2015.01.02 to 2021.10.262021.10.2815:44:10.8722021.02.1100:00:09 Alert: AUDUSD- Tick Value; 1.002021.10.2815:44:11.279 CHFJPY: history synchronization started
2021.10.2815:44:11.281 CHFJPY: load 27 bytes of history data to synchronize in0:00:00.0002021.10.2815:44:11.281 CHFJPY: history synchronized from2015.01.02 to 2021.10.262021.10.2815:44:11.2822021.02.1100:00:11 Alert: CHFJPY- Tick Value; 0.962021.10.2815:44:11.6822021.02.1100:00:13 Alert: EURUSD- Tick Value; 1.002021.10.2815:44:11.683 NZDJPY: history synchronization started
2021.10.2815:44:11.685 NZDJPY: load 27 bytes of history data to synchronize in0:00:00.0002021.10.2815:44:11.685 NZDJPY: history synchronized from2019.01.02 to 2021.10.132021.10.2815:44:11.6862021.02.1100:00:15 Alert: NZDJPY- Tick Value; 0.962021.10.2815:44:12.087 AUDJPY: history synchronization started
2021.10.2815:44:12.090 AUDJPY: load 27 bytes of history data to synchronize in0:00:00.0002021.10.2815:44:12.090 AUDJPY: history synchronized from2015.01.02 to 2021.10.262021.10.2815:44:12.0902021.02.1100:00:17 Alert: AUDJPY- Tick Value; 0.962021.10.2815:47:05.8972021.02.1100:00:19 Alert: NZDCAD- Tick Value; 0.792021.10.2815:47:05.8972021.02.1100:00:21 Alert: XAUUSD- Tick Value; 0.102021.10.2815:47:05.8972021.02.1100:00:23 Alert: AUDCHF- Tick Value; 1.122021.10.2815:47:05.8972021.02.1100:00:25 Alert: EURJPY- Tick Value; 0.962021.10.2815:47:05.8972021.02.1100:00:27 Alert: AUDUSD- Tick Value; 1.002021.10.2815:47:05.8972021.02.1100:00:29 Alert: CHFJPY- Tick Value; 0.962021.10.2815:47:05.8972021.02.1100:00:31 Alert: EURUSD- Tick Value; 1.002021.10.2815:47:05.8972021.02.1100:00:33 Alert: NZDJPY- Tick Value; 0.962021.10.2815:47:05.8972021.02.1100:00:35 Alert: AUDJPY- Tick Value; 0.96
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
PIP, Point, or Tick are all different in general.
What is a TICK? - MQL4 programming forum (2014)
You buy at the Ask and sell at the Bid. Pending Buy Stop orders become market orders when hit and open at the Ask.
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?
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
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?
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?
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
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.
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
). It should look like this:
Indicate on which symbol and on which server are you running the tests?
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?
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:
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)
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
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.
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:
and log: