Private Sub INI_DDE()
'LinkSources (xlOLELinks)
On Error GoTo ErrorHandler
For i = 0 To 10
Text1(i).LinkTopic = "MT4|BID" ' Set link topic.
Text1(i).LinkTimeout = 2
Text1(i).LinkMode = 2 ' Set link mode.
Next i
Text1(0).LinkItem = "EURGBP" ' Set link item.
Text1(1).LinkItem = "EURUSD"
Text1(2).LinkItem = "EURCHF"
Text1(3).LinkItem = "EURJPY"
Text1(4).LinkItem = "GBPUSD"
Text1(5).LinkItem = "GBPCHF"
Text1(6).LinkItem = "GBPJPY"
Text1(7).LinkItem = "USDCHF"
Text1(8).LinkItem = "USDJPY"
Text1(9).LinkItem = "CHFJPY"
Text1(10).LinkItem = "GOLD"
For i = 0 To 10
Text1(i).LinkRequest ' Update text box.
Picture1(i).Picture = Image3(2).Picture
Picture1(i).Cls
Text1(i).LinkMode = 1 ' Set link mode.
Text1(i).LinkRequest ' Update text box.
Next i
wait (5)
For i = 0 To 10
Picture1(i).Print " " & Text1(i).Text
Mass_B(i) = False
If Text1(i).Text <> "N/A" Then
MMas(0, i) = Text1(i).Text
Mass_B(i) = True
End If
Next i
Exit Sub
ErrorHandler:
N = MsgBox(Text1(i).LinkItem & " Error " & Err.Number & ". " & Err.Description, vbApplicationModal, " INFO") ' Error-handling routine.
Select Case Err.Number ' Evaluate error number.
Case 285 '
If Text1(i).LinkItem = "GOLD" Then
Text1(i).LinkItem = "XAUUSD"
Resume
End If
Case Else
End Select
End Sub
'LinkSources (xlOLELinks)
On Error GoTo ErrorHandler
For i = 0 To 10
Text1(i).LinkTopic = "MT4|BID" ' Set link topic.
Text1(i).LinkTimeout = 2
Text1(i).LinkMode = 2 ' Set link mode.
Next i
Text1(0).LinkItem = "EURGBP" ' Set link item.
Text1(1).LinkItem = "EURUSD"
Text1(2).LinkItem = "EURCHF"
Text1(3).LinkItem = "EURJPY"
Text1(4).LinkItem = "GBPUSD"
Text1(5).LinkItem = "GBPCHF"
Text1(6).LinkItem = "GBPJPY"
Text1(7).LinkItem = "USDCHF"
Text1(8).LinkItem = "USDJPY"
Text1(9).LinkItem = "CHFJPY"
Text1(10).LinkItem = "GOLD"
For i = 0 To 10
Text1(i).LinkRequest ' Update text box.
Picture1(i).Picture = Image3(2).Picture
Picture1(i).Cls
Text1(i).LinkMode = 1 ' Set link mode.
Text1(i).LinkRequest ' Update text box.
Next i
wait (5)
For i = 0 To 10
Picture1(i).Print " " & Text1(i).Text
Mass_B(i) = False
If Text1(i).Text <> "N/A" Then
MMas(0, i) = Text1(i).Text
Mass_B(i) = True
End If
Next i
Exit Sub
ErrorHandler:
N = MsgBox(Text1(i).LinkItem & " Error " & Err.Number & ". " & Err.Description, vbApplicationModal, " INFO") ' Error-handling routine.
Select Case Err.Number ' Evaluate error number.
Case 285 '
If Text1(i).LinkItem = "GOLD" Then
Text1(i).LinkItem = "XAUUSD"
Resume
End If
Case Else
End Select
End Sub
![MQL5 - Язык торговых стратегий для клиентского терминала MetaTrader 5](https://c.mql5.com/i/registerlandings/logo-2.png)
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
Уважаемые коллеги!
Подскажите пожалуйста. Можно ли обращаться к MQL4 за данными
подобным образом =MT4|HIGH!USDJPY, но не через Excel,
а из Delphi, ActiveX, 1С и т.д...