MT5 and trans2quik.dll - page 16

 
prostotrader:

You are suggesting an even bigger "hassle", the EBS account is good because the money is not divided into sections.

What you saw in the video works, but very slowly!

Quick --> DDE --> My pad <--> trans2quik.dl <--> Quick

I replaced Quick --> DDE --> with MT5 --> PostMessage -->.

It became much faster.

That said, 2 lines of code and no load on the terminal and system.

Message sending

Receiving of messages

I, in this situation, don't care much about EBS advantages.

I don't want to write anything for Quik, it's absolutely unstable terminal, I'm not going to sit, tied up and watch, whether Quik has crashed.

 
Dmi3:

I, in this situation, don't care much about the benefits of EBS.

I don't want to write anything for Quik, it is an absolutely unstable terminal, sitting like a tethered, watching whether Quik has fallen off, is not part of my life plans.

No one is forcing you to write....

 
prostotrader:

All these "gadgets" are needed to trade via QuickBooks on EBS accounts (or for real-time analysis of data outside MT5).

The data output to your application from the slow Quik via DDE is very slow,

so data is taken from MT5, and trading orders are sent to Kvik via their API (trans2quik.dll).

Mechanism is

MT5 --> Own Application <--> trans2quik.dll <--> Quick

Here is an example of trading in Kvik for futures against shares


Unfortunately, I understand nothing beyond MQL :(

Is it possible to write an instruction for dummies, how to implement all this, or it is a closed code and only its elements are presented?

 
Aleksey Vyazmikin:

Unfortunately, I don't understand anything beyond MQL :(

Is it possible to write an instruction for dummies how to implement all this, or it is a closed code and only its elements are presented?

It is unlikely that a "dummy" will write his own application that will receive PostMessage from MT5 and manage trades through Quick API

 

Does anyone know how to get free funds in QLua?

w32 = require("w32")

is_run = false
HWND_BROADCAST = 0xFFFF
A_double = 0.0
WParam = 2
lpParam = 1

WM_EBS_MONEY = w32.RegisterWindowMessage("WM_EBS_MONEY")


if WM_EBS_MONEY >= 0xC000 then
  is_run = true
else
  message("Window not registered!") 
end

function OnStop()
  is_run = false
end


function main()
  while is_run do

 --   A_double = Как получить свободные средства????
    lpParam = A_double * 100
    w32.PostMessage(HWND_BROADCAST, WM_EBS_MONEY, WParam, lpParam)
    sleep(100)
  end
end

 
prostotrader:

Have you ever tried writing in QPile or QLua?

You can write a simple script in them and that's it!

It may be possible to write it, but it is impossible to test it properly.

Who forbids to use at least the same C#/C++. LUA binding is quite normal.
As for testing, I may agree with you. QUIK has no possibility to test it in the tester. But it is possible to write a library of virtual trading (I've even got a ready library somewhere on the net) and test it as long as you like.

prostotrader:

Maybe someone knows how to get free funds in QLua?

>>>

P.S. There is good file QLUA.chm in QUIK. Open it and read it.

 
prostotrader:

Does anyone know how to get free funds in QLua?

There is a getMoneyEx() function in lua, maybe you can use it. http://luaq.ru/getMoneyEx.html

 
Vitalii Ananev:

The lua has a getMoneyEx() function, maybe you can use it. http://luaq.ru/getMoneyEx.html

Thank you, the problem has been solved.

The function is called

getPortfolioInfoEx

Everyone, there is a mechanism for trading in Quick on EBS accounts with very fast data retrieval from MT5

Added

Too bad MQ abandoned the stock section of MT5

Added

(if anyone needs it)

Library w32.dllhttps://quik2dde.ru/viewtopic.php?id=293

And LUA script

w32 = require("w32")

is_run = false
HWND_BROADCAST = 0xFFFF
A_double = 0.0
WParam = 2
lpParam = 1

WM_EBS_MONEY = w32.RegisterWindowMessage("WM_EBS_MONEY")

if WM_EBS_MONEY >= 0xC000 then
  is_run = true
else
  message("Message not registered!") 
end

function OnStop()
  is_run = false
end

function main()
  while is_run do
    a_table = getPortfolioInfoEx("MCXXXXXX", "XXXXX", 0)  
    A_double = a_table.limit_open_pos
    lpParam = math.floor (A_double * 100)
    w32.PostMessage(HWND_BROADCAST, WM_EBS_MONEY, WParam, lpParam)
    sleep(10)
  end
end

Where

MCXXXXXX - firm ID
XXXXX - accaunt

Added

That's how it works


 

See how Quick works internally (table update.... 1pc difference made by me math.floor )


 
prostotrader:

See how Quick works internally (table update.... 1pc difference made by me math.floor )


So, is it that much of a lag in its rendering?

Reason: