I am just starting using RTD sending Order Commands from Excel to MT4 and I am stuck.
All I can find is how to Close ALL open trades, not my first choice.
VBA to Buy
------------------------------------
Sub EURUSD_Buy
Sheets("Trades").Select
If Range("O24") = "No Change" Then Exit Sub
If Range("P24") = "Sell" Then Exit Sub
Set cmd = CreateObject("FXBlueLabs.ExcelCommand")
strResult = cmd.SendCommand(Range("B1").Value, "BUY", "s=EURUSD.p|v=1000", 5)
End Sub
------------------------------------
Sub CloseAll()
Set cmd = CreateObject("FXBlueLabs.ExcelCommand")
strResult = cmd.SendCommand(Range("B1").Value, "CLOSEALL", "", 20
End Sub
I need the VBA String to simply close EURUSD only surely shouldn't be that hard you'd think, opening was easy enough.
I just can't find any code that does it anywhere.
Thanks
All I can find is how to Close ALL open trades, not my first choice.
VBA to Buy
------------------------------------
Sub EURUSD_Buy
Sheets("Trades").Select
If Range("O24") = "No Change" Then Exit Sub
If Range("P24") = "Sell" Then Exit Sub
Set cmd = CreateObject("FXBlueLabs.ExcelCommand")
strResult = cmd.SendCommand(Range("B1").Value, "BUY", "s=EURUSD.p|v=1000", 5)
End Sub
------------------------------------
Sub CloseAll()
Set cmd = CreateObject("FXBlueLabs.ExcelCommand")
strResult = cmd.SendCommand(Range("B1").Value, "CLOSEALL", "", 20
End Sub
I need the VBA String to simply close EURUSD only surely shouldn't be that hard you'd think, opening was easy enough.
I just can't find any code that does it anywhere.
Thanks