MT3 API for VB.net and C# - page 2

 
scorpion:
I find it has no problem. Maybe you don't set the Lots correctly, because Lots in mini differs from standard account and also differs from one currency pair to another. Be sure to pay more attention to it. To know more about Lots of all pairs, you should explore the ConSecurity array returned from GetSecurities() function.

thanks for the pointer. I'm having a look at the differences and it appears that the volume i need to push through is just 10x that of the mini which of course makes sense as 1 lot in mini is 10k and 1 lot in std is 100k.

With this in mind, when I ask for the current rate with a volume of 1, it says invalid volume which i expect. 1000 (1 lot for std), it says off quotes. So I'm really confused

 

In standard account 1 lot of EURUSD = 100,000 units (100k), so the Lots value should be 100 for standard, while 10 for mini. (The Lots parameter expects lot size in kilo)

 

Be careful with currency pair. If you play with GetSecurities(), you will see the lot size of GBPUSD = 70,000 while EURUSD = 100,000 in standard account.

 

Btw, use GetCurrentRate() before closing an order only. For normal flow of ticks, try using GetUpdatedTickInfo() while in pumping mode.

 
scorpion:
Btw, use GetCurrentRate() before closing an order only. For normal flow of ticks, try using GetUpdatedTickInfo() while in pumping mode.

I usually GetCurrentRate() before sending an order also because so many times I've been rejected using pumped prices because they're stale. THe main reason why I'm getting confused with GetCurrentRates() on standard account is that it just doens't seem to work regardless of the params I send.

Correct me if I'm wrong but shouldn't I be able to pass 0 as the volume parameters and still get the quote?

 

Sorry, did anybody here know how to make the metatrader"3" get the market price more faster?

 
Cartoon:
Sorry, did anybody here know how to make the metatrader"3" get the market price more faster?

scorpion will def know better but the pumping process seems to be on a timer like every second and there doesn't seem to be any way of altering the frequency. It's the same in the api as in the MT app. The way I'd get it faster i by callign the getcurrentrate/price function every 0.x seconds or however fast you require. This is most likely the cause of getting the Price Changed error so often during fast markets because the underlying price can change x times in 1 second while MT will only show the price every second. I find however I have more difficulty in closing out than opening a trade due to this issue. I think it might also depend on the dealer

 

All underlying restrictions are concealed inside mtapi.dll. If only I could hack the file and took out all restrictions. I disassembled the dll a few days ago, and I found 'Too frequent requests' restriction. Unfortunately it's quite complex to be removed. If only I were an expert in hacking the asm code.

I doubt whether the mtapi.dll is account for the delay in price update or not. But I think it is for sure. The dll might use GetUpdatedRate() to get rate from server every few seconds???

 
Cartoon:
Sorry, did anybody here know how to make the metatrader"3" get the market price more faster?

Faster market price can only be in high-speed feed api https://www.metaquotes.net/metatraderapi/feedapi.

 

firstly let me say that the wrapped .net mtapi is a godsend and I can't thank you enough for makign it available to the public. I am, however, having a little trouble with some of the functions. In particular the GetHistoricalRates function. While this doesnt give me any errors, the array I assign it to doens't get populated.

perhaps it's the way I@m calling it?

GetHistoricalRates("EURUSD", period, new DateTime(2005, 6, 10, 0, 0, 0));

Reason: