Hi! I'm trying to create an indicator function and I have a question: the indicator draws arrows when curves cross, but how do I get this signal from the indicator function via iCustom? (1)
I was wondering if I could transfer this signal using a true/false condition? (2)
But then how do I transfer this signal through iCustom? Do I still have to specify both indicator variables in the indicator function and in iCustom and declare arrays?
(1) else
{ // если выполнено условие нисходящего пересеченияPrint(" Up выполнены условия истинности пересечения ");
CrossDownBuffer[index_up_1]=Cr1+5*Point;// ставим стрелку вниз //
(2) else
{ // если выполнено условие нисходящего пересеченияPrint(" Up выполнены условия истинности пересечения ");
CrossDownBuffer[index_up_1]=Cr1+5*Point;// ставим стрелку вниз //
Yeah, but if we put Alert after the loop's parentheses, it will only return the values in those variables after the loop has been executed. And if you put it in the loop, and also add the variable i in it, we'll see these values at each candlestick, and even know its number. And since your loop goes from the present to the past, the values closest to the market can be seen on the chart using the "crosshair" tool - it will show (with the left mouse button pressed) how many candles it is away from the current position
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Do I understand correctly, if I write i instead of Time[i], I get the bar number?
And if I use such a script in an EA, then when a new crossing occurs, the value of i will change to a new one?
Hi! I'm trying to create an indicator function and I have a question: the indicator draws arrows when curves cross, but how do I get this signal from the indicator function via iCustom? (1)
I was wondering if I could transfer this signal using a true/false condition? (2)
But then how do I transfer this signal through iCustom? Do I still have to specify both indicator variables in the indicator function and in iCustom and declare arrays?
//+------------------------------------------------------------------+
//| 00003.mq4 |
//| Copyright 2012, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2012, MetaQuotes Software Corp.
#property link "http://www.metaquotes.net"
#property show_inputs
extern int Depth=100;
extern inttern ExtRVIPeriod=10;
double mini=0;
double maxi=0;
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start() {
//----
if(Depth>Bars-1) Depth=Bars-1;
for(int i=1; i<Depth; i++) {
double RVI = iRVI(NULL,0,ExtRVIPeriod,MODE_MAIN,i);
if(RVI < mini){
mini=RVI;
}
if(RVI > maxi){
maxi=RVI;
}
}
//----
Alert (mini," : ",maxi);
return(0);
}
//+------------------------------------------------------------------+
Folks, please pull up for beginner's answers. The previous shift is exhausted.
It's true - these answers sometimes make you feel so tired that you feel like you've really been on a work shift :)
Like this?
.......... .........
Alert (mini," : ",maxi);
return(0);
}