[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 752
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
How to simplify it
Maybe into an array
Or into two one-dimensional arrays.
Then, knowing the balance, find the corresponding value.
Friends, could you suggest a mechanism to scale the price from here: https: //www.mql5.com/ru/code/7933
add it here (see attachment to this post)
So the rectangles from the second currency pair were formed correctly on the chart of the first currency pair?
(So that OverLay Chart would be inscribed in these rectangles)?
Something like that, I guess.
SZY The "SRC" code insertion button is awkward to use, it's not easy to read.
It's not working only on the first (parameter from and to), but ignores the second.
I can't get it to work, it only trades on the first (parameter from and to) and ignores the second.
The return was not removed after the first block.
You can try it like this
return(0);
Has anyone met the indicator to see the time of the bar opening in a low TF, not how much time is interesting, and to draw the marks on the chart where the bar started and where it ended
Igor, we discussed something similar in this thread. h ttps://www.mql5.com/ru/forum/124660
Not that, something like that:
I want to draw bar times on M5 for M15, M30 and H1
I don't know how to start it :)
Please advise what the catch is:
1) I fill a two-dimensional array with the time of formation of the ZigZag extremum and the extremum value itself.
2) Filling the second array with ones or twos depending on whether the extremum corresponding to a given element is a local maximum or minimum.
3) I output the results through Alert.
but in a place where 1 or 2 should be printed zeros are always printed.
What's the catch?!?
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
string TimeSave1[100][2], TimeSave2[100][2];
double A[], B[];
double Number_of_extremum[];
extern string Currency = "EURUSD";
+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
int k;
k=0;
double date;
int status;
for(int shift = 0; shift <= Bars-1; shift++)
{
date = iCustom(NULL, 0, "ZigZag", 12, 5, 3, 0, shift);
//----------------------------------------------------
if(date > 0)
{
TimeSave1[k][0]=TimeToStr(Time[shift]);
TimeSave1[k][1]=date;
k++;
}
}
//====================================================
for (int u=1;u<=k;u++)
{
if (StrToDouble(TimeSave1[u][1])<=StrToDouble(TimeSave1[u-1][1]))
{
Number_of_extremum[u]=1;// значит под номером u - нашли min
}
else
if (StrToDouble(TimeSave1[u][1])>=StrToDouble(TimeSave1[u-1][1]))
{
Number_of_extremum[u]=2;// значит под номером u - нашли max
}
}
//====================================================
for (int j=1;j<10;j++)
{
Alert("время== ",TimeSave1[j][0], " значение== ", TimeSave1[j][1], " max/min== ", Number_of_extremum[j]);
}
//----
return(0);
}
//+------------------------------------------------------------------+
And one more clarification:
how to compare dates and times in mql (for example, I need to determine which vertex of ZZ formed earlier - to do this I need to compare the time of their formation...)
Not that, something like that:
I want to draw bar times on M5 for M15, M30 and H1
I don't know how to start drawing :)
Can't you draw a rectangle around the right number of bars?