Developers! Do you even test what you create? - page 7

 

Good afternoon!

С-4

Stock# is not free for the new Cgate Plaza II gateway.

The Cgate API is freely distributed by the exchange. Write your own terminal (of course it won't be as pretty as MQ),

is not difficult, it's difficult to translate Cgate API to API user, who will be able to write in any language their own Expert Advisor - DLL.

In essence, my idea is this:

BASE --> PLAZAII(Cgate API) --> Simple Terminal --> DLL user advisor.

In fig. I obtain a test quotes from the exchange via Plaza II protocol


The terminal is almost ready (I wrote it 3 days)!

In the language (in a DLL-advisor) you can create any "gadgets" you want (cups, buttons, additional graphics, etc.),

you will only be limited by the development environment.

There is, however, a big disadvantage in this concept - the complexity of testing the EA (only through logs, for now).

But the undeniable advantages - the "direct" connection to exchange, and any programming language.

P.S Client-server concept (as in general any electronic trading) based ONLY on the event model: REQUEST-Answer - that's the BASIS!

You can invent anything you like (various checks, etc.), but if it does not work properly request-response, in the end it will still

Inevitably, it will lead to an error in the Expert Advisor.


 
Mikalas:

...

There is, however, a big disadvantage in this concept - the difficulty of testing the EA (only through logs, for now).

...

There is a very big plus in MT5 concept - communication on the forum with smart guys. If it does not cost anything, then ...

 
Mikalas:

The terminal is almost ready (3 whole days of writing)!

Impressive for three days!

The only question is: if everything is so good, why are you still using MT5?

DC2008:

There's a very big plus in the concept of MT5 - communication on the forum with smart guys. If it doesn't cost anything, then .

Yeah, that's for sure. Nowadays products like this just can't survive without their ecosystem. A forum, communication, thousands of users, activists like you and me ready to post, discuss, blog... Without user support, any project, whatever it may be, will sooner or later stall, and all efforts to develop it will be wasted.
 

С-4!

The terminal - serves ONLY to display anything!

I've written before that it's not difficult at all. The hardest part is transforming the Cgate API into a User API,

I've done 1/200 (not the hardest) part of what needs to be done.

Cgate Plaza II is a streaming asynchronous client-server, and the streams can

contain more than one type of information!

Unfortunately, I don't have the level to do this transformation completely quickly....

There are only 2 (paid) products on the market that work via Cgate, and I'm not

I'm not sure if it's the right one.

So, on FORTS, until I write CGate Trader, it's MT5.

 

By the way, I came across an interesting article on MetaTrader 5 Trading Events by MetaQuotes Software Corp, dated January 24, 2011. Among other things it says:

Сообщения о торговых событиях и об изменениях в торговой истории поступают по независимым каналам. При отправке запроса на покупку функцией OrderSend() можно сразу же узнать тикет ордера, который был создан при успешном результате проверки запроса. Но в то же время сам ордер еще может не появиться в клиентском терминале и попытка выбрать его с помощью функции OrderSelect() окажется неуспешной. 

Also:

All operations on the trade server and sending messages about trade events are performed asynchronously. There is only one guaranteed way to find out what exactly has changed on a trade account. This way is to remember the state of trade and trading history and compare the new state with the saved one.

The following are examples of how to properly organise the order and trade counter.

If you carefully look into the problem of the author, it will turn out that there is no problem, you just need to find moral strength to reject OnTradeTransaction() function and catch all changes in OnTimer() with high resolution update.

In a couple of minutes I drafted my example of work with changed history.

///
/// Следит за поступлением новых трейдов и ордеров.
///
void OnTimer()
{
     datetime tBegin = TimeCurrent();
     HistorySelect(dataBegin, TimeCurrent());
     //Если новые трейды не поступили, то и нечего обрабатывать.
     if(HistoryDealsTotal() == 0)return;
     AddDeals();
     dataBegin = tBegin;
}
There is a hidden pitfall in this example and it cannot be used as is, but I think the concept is clear. Each time we load a piece of history from the last trade processed to the current time. If a new trade comes, we process it and shuffle the beginning of history loading to the time of trade arrival.
 
C-4:

By the way, I came across an interesting article on MetaTrader 5 Trading Events by MetaQuotes Software Corp, dated January 24, 2011. Among other things it says:

Uh-huh

Rosh:

In addition, there are articles on this topic:

 

And I recommend the author to read the article How to create a trading robot and not to waste time. It fits exactly:

Программисты часто выбирают четвертый путь – они сразу начинают писать торгового робота и не хотят особенно тратить время на ручную торговлю. Зачем? Ведь можно сразу написать автомат, потратив на это несколько месяцев, и затем только пожинать плоды своего труда.

But "you can't take the fish out of the pond without labor", and the programmer often starts writing all the necessary infrastructure - getting and processing price data, visual representation of charts and indicators, custom tools for testing the strategy on the history, and so on - from scratch, instead of the trading robot.

In the process of this work he gets a lot of useful experience. But at the same time he or she, in most cases, is not one bit closer to the final goal - creation of an automated trading system. And even if he or she goes all the way to the end, where is the guarantee that the written robot will be profitable? And what if he or she wants to write another trading system? You have to rebuild everything and deal with the new inevitable programming errors.

 

Vasily!

I certainly understand your attachment to the MT-5, but take my word for it.

There is no point in digging into histories, because wrong data might be written there too!

Please understand a simple thing - Client-server = request-response!

See, the order was upgraded and the response comes that it was partially executed,

what do you think will happen in the history?

 

Roch!

You, too impose on me what I have read five times.

I'm not talking about making a robot(or how to write one), but about

I'm talking not about making a robot (or how to write it), but about specific mistakes in MT-5!

You don't even bother to look closely at the picture

I attached (MESSAGE TIME)

 
Mikalas:

You don't even bother to look closely at the picture that

I attached.

poor guy, i wish i could help you... you're so tense, you're screaming.


you can give me a text log file instead of screenshots.

+ a code where I can reproduce your error?