Wishes for MQL5 - page 90

 

Now you can't put a filter on positions only for a certain symbol. That is, you have to go through all orders.

This slows down the EA and if there are a lot of charts on which the EA is working, it can considerably slow down and load the CPU.

Например такой код

for( Ord = 0; Ord < OrdersTotal(); Ord++) {
   OrderSelect( Ord, SELECT_BY_POS);
   if(Symbol() == OrderSymbol() && StringFind(OrderComment(), "MA-Price") != -1) {
      IsOrdFound = true;
      break;
   }
}
А хотелось бы фунцию для установки фильтра по символу

OrderSelectSymbol(Symbol());

for( Ord = 0; Ord < OrdersTotal(); Ord++) {
   OrderSelect( Ord, SELECT_BY_POS);
   if(StringFind(OrderComment(), "My comment") != -1) {
      IsOrdFound = true;
      break;
   }
}



Или если теперь будет объектный язык, то что то типа такого варианта:

OpenedOrdGroup ordGroup = new OpenedOrdGroup(Symbol());

for( ord = 0; ord < ordGroup. count; ord++) {
  if( findSubstr( ordGroup. orders[ ord]. comment, "My comment") != -1) {
     isOrdFound = true;
     break;
  }
}
 
stringo писал(а) >>

It is worth mentioning, however, that custom indicators can perform purely computational tasks and have no access to any windows or graphical objects.

And... is it possible to run such a "computational" indicator outside all windows? (e.g. to monitor IsExpertEnabled and stuff like that and tell who it's supposed to).

Can it draw? Can it loop?

Can it call/unload EAs, scripts, set/unset default and custom indicators?

 
SK. писал(а) >>

And... can such a "computational" indicator be run outside of all windows? (e.g. to monitor IsExpertEnabled and such and report to whoever needs it)

Can it draw? Can it loop?

Can it call/uncall EAs, scripts, set/unset default and custom indicators?

For all these questions - no, unfortunately.

I have to have a separate chart window and attach a "calculating" Expert Advisor to it. The Expert Advisor can work on a timer, so it does not have to be looped in.

 

Thanks, that clears some things up.

Is there any way to run anything that's not tied to a window? (for general needs).

And is there any way to call something else from that "something"? (a timer expert, for example)

 
SK. писал(а) >>

Thanks, that clears some things up.

Is there any way to run anything that's not tied to a window? (for general needs).

And is there any way to call something else from that "something"? (a timer expert, for example).

There won't be anything not tied to a window.

Can't answer that question yet.

You can send a custom event to any chart. The Expert Advisor hanging on that chart can handle incoming events

 
stringo писал(а) >>

Nothing untethered to the window is going to happen

Can't answer that question yet.

You can send a custom event to any chart. Hanging on that chart the Expert Advisor can handle incoming events

Thanks for the reply.

But we need an Expert Advisor on that chart. These EAs will not always be synchronized (without special features - never).

In my case, I am talking about a custom (application) service program. The tasks include, for example, technical analysis, candlestick analysis, and custom position processing algorithms. For example, if you press the button (in the system menu), the current screen displays the candlestick analysis. Press another - a window popped up where you can set SL and TP preferences for the current window. Press the third button - stops are opened on all positions (where they are not available, good before the news) in accordance with preferences and current brokerage settings. Another button - the corridor for the minimum distance was drawn... And so on. And everything is interlinked by the available funds, by the probability of success of the transaction according to different financial instruments, with their preferences, priorities, integral analysis, etc..

This task as a whole does not require many copies of one Expert Advisor in all windows. Such a programme may be "one for all, we will pay the price". It could be. At the moment I just do not know the capabilities of MT5.

 
Make the interaction with the MySql database
 
stringo писал(а) >>

Nothing untethered to the window is going to happen

Can't answer that question yet.

You can send a custom event to any chart. The Expert Advisor hanging on that chart can handle incoming events

1. Too bad though. // About the untethered prog.

As a reasonably (imha) cheap compromise in terms of implementation: maybe we should do something like "null" charts,

on which you can hang calculators? And preferably an unlimited number of such graphs, since at this point I suspect inheritance of MT.

because here I suspect the inheritance of MT4 constraint "one chart - one Expert Advisor"... :)

2. About events. Custom events - that is great. Thank you very much for that. :)

I was glad to see Tetris with OnTimer event and in general the appearance of event-driven organization of launching

functions. And here I would like to go slower and more detailed :)

What other existing-planned "standard" events (platform events) to be sent to user's applications?

For example, I would like to have something like OnPositionIsClosed(int ticket) - not to have to look through all stacks of

open orders in search of orders that just closed by stop. I think that even in 4

besides the standard Init()-Deinit()-Start(), it is very easy to add OrderStopped() - in any case, the terminal tracks

The terminal still monitors closing of orders to display changes of the situation in its windows. Well, why don't the user programs

inform them? And you would get a lot of gratitude from users... - I guarantee. :)

Ideally, it would be great to have (in MT5) platform-wide event manager, with possibility for

to subscribe to messages about an event, and also initiate

to initiate general purpose events broadcasted to all subscribed applications.

 

Dear developers!

We just need to add an option for an order when viewing MODE_HISTORY - how the order is closed, for example:

- StopLoss;

-TakeProfit;

- By market, etc.

Some banks using MQ4 platform close all orders and open new ones when they go over 0 (this is not new in itself).

But in this case the Expert Advisor has to strain very much to find out in the program how an order was closed, and the most important thing is a lot of unnecessary code.

The more code - the less reliable it is!

.

P.S. This may have already been discussed, but I have not seen it and decided to share my concerns.

 
VBAG писал(а) >>

Some banks that use the MQ4 platform close all orders and open new ones when they go through 0 (this is not new in itself).

But in this case the Expert Advisor has to strain a lot to find out how the order was closed in the program, and most importantly, a lot of unnecessary code appears.

And, what is more important, there is a lot of unnecessary code.

And, what is worse, there is no definite STATE method for identifying orders in this situation. For example in this case the brokerage company, without thinking twice, assigns new tickets which are not connected in any way with the initial ones.

with initial ones, just according to a list :) We have to put a lot of effort to track each order's history.

But in MT5 the work with orders seems to be radically changed (see MetaTrader 5 Client Terminal),

and exactly how - seems to be either a terrible secret or a big surprise, about which it is not quite proper to ask - it is easier to wait for the new terminal than to get intelligible answers

from the developers. :) However, this topic is about suggestions, and I hope that the developers are looking at the root of the problem, rather than a formal way to implement trading.

I agree with them in all respects - they need a good service for programmers to work with open-posted - paused positions.

Reason: