Questions from Beginners MQL5 MT5 MetaTrader 5 - page 787

 
fxsaber:

I understand the problem. To solve it beautifully, you need to think about it.

In any case, these two functions are basic

Their use needs to be played around to achieve a solution.

I have a rough idea of how to implement it, but how to put it in the code - no(

Probably, we should compare the time of bars and if it is less than the current time, we should skip scrolling. Variant #2: count the number of bars of the chart from the current time to the first visible one, and scroll by this number - it would probably be smoother.

Anyway, I can't put any implementation into the code - I must be busy(

 
Vitaly Muzichenko:

I have a rough idea of how to implement this, but I can't figure out how to put it into the code.

Probably need to compare bar times, and if they are less than the current time - skip scrolling. Variant #2: count the number of bars from the current time to the first visible time, and scroll by this number, it would probably be smoother.

Anyway, can't put any implementation in the code - I've probably worked too hard(

Overkill, the only problem there is determining which chart is the current master. This is solved through a static array that stores the right bar time for each chart. The timer compares it to the current position and the one which is different is the master. Tomorrow I will finish it.


ZZS Completed.

 
fxsaber:

Overkill, the only problem there is determining which chart is currently leading. This is solved via a static array that stores the right bar time for each chart. The timer compares it to the current position and the one which is different is the master. Tomorrow I will finish it.


SZZ finished it.

Thank you very much, works just fine!

 

Do you guys have a function or class for calculating prices and setting limit orders?

For example, I want to set 2 Limit orders at 100p above the current price with a step of 50p and one Limit order below the price at 100p.

 

Can you tell me where and what needs to be removed so that there is no rubbish on the graph?


 

Please help me deal with trailing advisor in lossless MT5. I tried to rewrite my EA, I get frequent "invalid stops" error.

I searched for no-loss EAs, but they did not put a stop if order's profit was at a loss.

The idea is simple :

opened a position ->

automatically set a stop at the minimum distance according to the symbol specification (or in increments) ->

Next, trailing stop before entering the no-loss zone (e.g. +10 pips profit from the order price) by the set value in 5 pips ->

After transfer to a lossless position (+10 pips) trailing stop and (or) step of trailing stop increases to 100 pips (200 pips, etc., according to the set value)

Files:
Trailing.mq5  10 kb
 
Vitaly Muzichenko:

Can you tell me where and what needs to be removed so that no rubbish appears on the graph?


You just need to disable the "Calendar" - auto update function, then delete all the events.

After that, the calendar will not work and will not appear on the chart.


 
SEM:

Simply deactivate the "Calendar" - auto update function, then delete all events.

After that, the calendar will not work and will not appear on the chart.

Where? Bild 1653


 
Vitaly Muzichenko:

Where? Bild 1653



If there's no calendar tab, you need to:

  • or re-login to the account which will display the calendar
  • or clear default.tpl

 
Vladimir Karputov:

If there is no calendar tab, you must:

  • either re-login to the account that will display the calendar
  • Or clear default.tpl

Thanks, reinstalled the terminal. All disabled, hopefully won't show up on the chart again.

Reason: