Hi, could you please tell me how to write an expression? If Bar2 has an opening price lower than the closing one, assign the value of Bar2b, and if the opposite is true, assign the value of Bar2m. Thank you!
art-gan: Hello, could you please tell me how to write an expression? If Bar2 has an opening price lower than the closing one, assign Bar2b to it. If it is vice versa, assign Bar2m to it. Thank you!
I want to draw the readings on D1 by sections on a smaller TF, it doesn't draw anything:
int start() { int counted_bars=IndicatorCounted(); int limit; if (TimeFrame>0) limit=Bars-counted_bars+(TimeFrame/Period()); else limit=Bars-counted_bars-1; int i=limit; int C_time; int Bar_Shift; if (limit==0) return(0); //wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww int h,l,h1,l1; while(i>=0) { C_time=Time[i]; Bar_Shift=iBarShift(NULL,TimeFrame,C_time,true); h=iMA(NULL,0,period,0,MODE_EMA,2,Bar_Shift); l=iMA(NULL,0,period,0,MODE_EMA,3,Bar_Shift);
Cycle:
Through integers, the calculation speed will increase by an order of magnitude. And you can use standard functions to search
If necessary, a solution can be found. For example, go to an integer ordered array. Search for the desired value in it.
Cycle:
Please tell me the name of the default functions to search for the right value of an array element.
In the array function group, I don't seem to have found any.
Take a close look at this function
Take a close look at this feature
Hello, could you please tell me how to write an expression? If Bar2 has an opening price lower than the closing one, assign Bar2b to it. If it is vice versa, assign Bar2m to it. Thank you!
That's how you write it:
Good day dear forum users!!!
I just started to learn MQL, so I apologize for maybe a simple question...
I have an indicator in which I need to insert the LWMA in the same separate window... advise how to implement it ...
The figure shows Vector indicator (white and yellow lines) , and the red waving is superimposed on this inductor in the basement???
Good afternoon.
I want to draw the readings on D1 by sections on a smaller TF, it doesn't draw anything:
int start()
{
int counted_bars=IndicatorCounted();
int limit;
if (TimeFrame>0) limit=Bars-counted_bars+(TimeFrame/Period());
else limit=Bars-counted_bars-1;
int i=limit;
int C_time;
int Bar_Shift;
if (limit==0) return(0);
//wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
int h,l,h1,l1;
while(i>=0)
{
C_time=Time[i];
Bar_Shift=iBarShift(NULL,TimeFrame,C_time,true);
h=iMA(NULL,0,period,0,MODE_EMA,2,Bar_Shift);
l=iMA(NULL,0,period,0,MODE_EMA,3,Bar_Shift);
//----
ExtMapBuffer1[Bar_Shift]=h;
ExtMapBuffer2[Bar_Shift]=l;
i--;}
//----
return(0);
}
Maybe someone will correct the code or show me how to do it.
Thanks in advance.