Questions from Beginners MQL4 MT4 MetaTrader 4 - page 153

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
i have a code with classes with info panel!!!
BUT i have a problem!
i have a label on it and i can react it through remote settings.... so when you change the settings 2-3 times, the panel itself moves in different directions!!! and when you change the timeframe 2-3 times!!! how can i get rid of this???
a little more info:
Found that if in Dialog.mqh file in function CAppDialog::Destroy(const int reason) to comment out lines
if(m_deinit_reason!=WRONG_VALUE)
return;
then the panel will be normally destroyed and restarted when switching timeframes.
Hello. I am writing an MT4 indicator that only works with graphical objects and also tracks the position of graphical objects created by the same indicator working on a different period. When I move the vertical line of the major period manually the trend lines from the new position of the vertical line of the major period are redrawn, and also the vertical line of the minor period is redrawn. All this is handled in the OnChartEvent event. The problem is that when moving the vertical line of a high period sometimes objects of a low period are not redrawn right away, but only when I double click on the vertical line of an indicator, working on a high period, they are redrawn. And on another more powerful PC this happens less often. I apply the ChartRedraw() function in the code after re-drawing objects.
May it happen due to the lack of PC resources?
I want to try to run the indicators on different charts and use EventChartCustom to generate a custom event from the indicator working on a higher period to the second indicator. Maybe this will speed up the operation of the program?
How do I quickly zero (clear) all elements of a structure?
The structure is global. At certain moments it has to be cleared to be filled with new data later.
I understand that you can element by element equate everything to zero. Is there any other way?
struct ABC{
int a1;
int a2;
int a3;
};
ABC a;
We need something like this
a = 0; // all elements in the steel structure are zero
How do I quickly zero (clear) all elements of a structure?
The structure is global. At certain moments it has to be cleared to be filled with new data later.
I understand that you can element by element equate everything to zero. Is there any other way?
struct ABC{
int a1;
int a2;
int a3;
};
ABC a;
We need something like this
a = 0; // all elements in the steel structure are zero
I have one, but it triggers after N pips and stops at breakeven....
fix it please, i'm out of my head!!!
does anyone have a trawl that triggers after N pips and then goes after the price?
I have one, but it works after N pips and stops at breakeven....
fix it please, i'm out of my head!!!
here my trawl works, it works:
call the function 2 parameters magic number and trawl np
How do I quickly zero (clear) all elements of a structure?
The structure is global. At certain moments it has to be cleared to be filled with new data.
I understand that you can element by element equate everything to zero. Is there another way?
Hello! is there a code for total earnings on all orders in one day?
I have one:
It's referred to like this:
Can i modify it in any way, so that i can see the profit for one currency pair in one day and the total profit for all currency pairs?
and total for all currency pairs?
RemoveOrderSymbol() == Symbol() from the condition:
then this part of the code will only count all orders in the terminal history by magic number if the magic number for different currencies is the same; if you removeOrderMagicNumber() == magic then all orders will be counted without considering the magic numberHi all. A word of advice to a newcomer. I want to do a little research on spread behaviour. I have some code that calculates the total spread. Everything is written, everything works fine.
I want to remove moments when spread does not perform any movements, i.e. bid and ask do not change.
I do this:
But nothing changes. Where am I going slow?