Questions from Beginners MQL5 MT5 MetaTrader 5 - page 923

 
foreXteller:

To download history quotes load MetaTrader 5, click on the icon with dollar symbol: "Symbol List Display" (or you can press Ctrl U). The "Symbols" window will appear. On the "SPECIFICATION" tab find the desired currency pair, e.g. GBPCHF. In the tab "BARs" set minute quotations (M1) and dates of the beginning and the end of the required period. After clicking on the "REQUEST" button, a csv file will be downloaded, which can be used to test strategies with the Metatrader or with your own programs.

Using EXCEL you can view the content of this file, where the first line reveals the information in the file, i.e. "date, time" and then" OPEN", "HIGH" "LOW", "CLOSE", "TICKVOL", "VOL", "SPREAD"

I know exactly what this data means, but how to make BIT and ASK which MetaTrader 5 uses?

In MetaTrader 5 EA, just ask for the prices via SymbolInfoTick() and you will get the prices. And you don't need to store anything :) In MetaTrader 5 you already have all the tick history (real ticks) as soon as you connect to the trade server.

 

Please help!!!

I want to calculate the cost of the lot

double Lts =1;

if(OrderCalcMargin(ORDER_TYPE_BUY,Symbol(),Lts,SymbolInfoDouble(Symbol(),SYMBOL_ASK),Margin))

Alert(Margin);

A warning message: empty controlled statement found

Margin takes value 0.

The strangest thing is that in pure version of mt5 this function works, but in mt5 from "opening broker" function passes 0.

 

Hi, could you advise on Deviation/Slippage?

The Ctrade class has m_trade.ResultPrice()(Gets the price confirmed by broker.) and the CPositionInfo class has m_position.PriceOpen()(Gets the position open price.). Do I understand correctly that the difference between these prices will be slippage? Are there any proven methods to get the slippage of open positions or trades from the history?

 
Pavel Nikiforov:

Are there any proven methods of getting slippage of open positions or trades from history?

https://www.mql5.com/ru/code/16134

SlipPage
SlipPage
  • www.mql5.com
Exp_i-SpectrAnalysis_WPR Эксперт Exp_i-SpectrAnalysis_WPR построен на основе изменения направления движения индикатора i-SpectrAnalysis_WPR. BalanceOfPower_Histogram Индикатор Balance of Power (BOP) в виде цветной гистограммы силы и направления действующего тренда. wlxBW5ZoneAlert Семафорный сигнальный индикатор с...
 
Vladimir Karputov:

In MetaTrader 5, just ask for the prices via SymbolInfoTick() and you will get the prices. And you don't need to store anything anywhere :) In MetaTrader 5 you already have all the tick history (real ticks) as soon as you connect to the trade server.

Dear Vladimir Karputov!

Thank you for the link!

I looked through your recommended article "TICK GENERATION ALGORITHM IN THE METATRADER 5 TERMINAL STRATEGY TESTER".

It's a little different - I don't want to analyze tick values on a minute interval, and the last market values from SymbolInfoTick() are not so important now.

Inorder to play with MetaTrader 5 in future I want to test my strategy (my robot) with my programs on minute quotes of several currencies simultaneously, considering theirASK, BID, VOLUME and SPREAD, but not candlesticks.

Since the programs are written in VISUAL C, I can't use MT for testing.

The programs are quite complex and can hardly be translated to MQL (I plan to use DLL files in the future ).

Thank you for your attention!

 
Hi, could you please tell me why in Windows 10 when you press F1 in MetaEditor, it doesn't open the help but goes somewhere to https://go.microsoft.com/?
 
Nauris Zukas:
Hi! Can you please tell me why in Windows 10 when I press F1 in MetaEditor it doesn't open the help but sends me to https://go.microsoft.com/ somewhere?

Is the cursor inside the MQL5 code opened in MetaEditor before pressing F1?

In MetaEditor the Help menu sections "Help Call" and"MQl5 Reference" work?

When the cursor is inside the standard Notepad program - what opens when I press F1?

Are you using the real Windows 10 or are you emulating running in Linux or Mac OS?

 
Vladimir Karputov:

Is the cursor inside the MQL5 code opened in MetaEditor before pressing F1?
Yes.
In the MetaEditor Help menu, do the "Help Call" and"MQl5 Reference" sections work?
The "MQl5 Help" does not open.
When the cursor is inside the standard Notepad program - what opens when you press F1?
https://go.microsoft.com
Are you using the real Windows 10 or are you emulating running on Linux or Mac OS?
Windows 10

Anyway, on my other computer I just pressed F1 on the function and the documentation opened immediately, here it doesn't work like that.

 
Nauris Zukas:

Is the cursor inside the MQL5 code opened in MetaEditor before you press F1?
Yes.
Do the "Help" and"MQl5 Reference" sections in the MetaEditor Help menu work?
The "MQl5 Help" does not open.
When the cursor is inside the standard Notepad program - what opens when you press F1?
https://go.microsoft.com
Are you using the real Windows 10 or are you emulating running on Linux or Mac OS?
Windows 10

Anyway, on my other computer I just pressed F1 on the function and the documentation opened immediately, here it doesn't work like that.

Reinstall the terminal in the same folder.

 
Vladimir Karputov:

Reinstall the terminal in the same folder.

Without the change, the"MQl5 Handbook" will not open.

Reason: