Is it possible to link three charts with different timeframes in the EA? Based on the indicator readings in two charts, a place and currency pair to enter is found, and based on the last third chart, the entry, stop and profit are calculated, and a position is opened for entry. Is this technically possible? Or do you need to create an Expert Advisor specifically for a certain timeframe to work in one chart? This requires not only counting the readings of bars, ticks or candlesticks from charts of different timeframes, but also analyzing the readings of at least two indicators and opening an order based on these data.
I was writing a function for detecting flytrap and got stuck in something that I do not understand. if statement does not work. maybe I wrote something wrong somewhere, I want you to take a fresh look, because I do not understand why. I even recorded a video from the debugger, where I show that the values are equal, but it does not work. please put my brain in place))))
{
int size = ArrayRange(arrayMinLow,0);
int digits = MarketInfo (symbol,MODE_DIGITS);
double spreadFlat = highLine - lowLine;
int directionFlat = -1;
int slew = 0;
for (int i = 0; i<size; i++){
double hl =arrayMinLow[i][0];
double ol = arrayMinLow[i][1];
double cl = arrayMinLow[i][2];
double ll = arrayMinLow[i][3];
if (hl == highLine || ol == highLine){ //вот тут не срабатываетif( directionFlat == -1 || directionFlat == 0)
slew++;
directionFlat = 1;
}elseif (cl == lowLine|| ll ==lowLine){
if( directionFlat == -1 || directionFlat == 1)
slew++;
directionFlat = 0;
}
}
if(slew >=4 )
returntrue;
returnfalse;
}
Deniskaaa: Is it possible to link three charts with different timeframes in the EA? Based on the indicator readings in two charts, a place and currency pair to enter is found, and based on the last third chart, an entry point, stop and profit are calculated, and a position is opened for entry. Is this technically possible? Or do you need to create an Expert Advisor specifically for a certain timeframe to work in one chart? We should not only count the readings of bars, ticks or candlesticks from charts of different timeframes, but analyze the readings of at least two indicators and open an order based on the third one.
Everything is possible! See documentation or help in MetaEditor!
Hello, I was writing a function for detecting flytags and got stuck in something that I do not understand. if statement does not work. maybe I wrote something wrong somewhere, I want you to take a fresh look, because I do not understand why. I even recorded a video from the debugger, showing that the values are equal, but it does not work. please put my brain in the place of))))
code:
bool checkLine(double highLine , double lowLine, double &arrayMinLow[][5] ) { int size = ArrayRange(arrayMinLow,0); int digits = MarketInfo (symbol,MODE_DIGITS);
double spreadFlat = highLine - lowLine;
int directionFlat = -1; int slew = 0; for (int i = 0; i<size; i++){ double hl =arrayMinLow[i][0]; double ol = arrayMinLow[i][1]; double cl = arrayMinLow[i][2]; double ll = arrayMinLow[i][3];
if (hl == highLine || ol == highLine){ //вот тут не срабатывает
If it makes things easier, I'll re-post it correctly. i've written a function for detecting flytags and i stumbled in something that i don't understand. if statement does not work. maybe i wrote something wrong somewhere, i want you to take a fresh look, i don't understand why. i even recorded a debugger video showing equaling values, but it does not work. please put my brain back into))))
{
int size = ArrayRange(arrayMinLow,0);
double spreadFlat = highLine - lowLine;
int directionFlat = -1;
int slew = 0;
for (int i = 0; i<size; i++){
double hl =arrayMinLow[i][0];
double ol = arrayMinLow[i][1];
double cl = arrayMinLow[i][2];
double ll = arrayMinLow[i][3];
if (hl == highLine || ol == highLine){ //вот тут не срабатываетif( directionFlat == -1 || directionFlat == 0)
slew++;
directionFlat = 1;
}elseif (cl == lowLine|| ll ==lowLine){
if( directionFlat == -1 || directionFlat == 1)
slew++;
directionFlat = 0;
}
}
if(slew >=4 )
returntrue;
returnfalse;
}
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.
Can you please tell me where I can find a code example that paints the indicator line in different colours?
As many colours, as many buffers! Provided the colour changes, you change the buffer! Lots of examples in CodeBase!
{ int size = ArrayRange(arrayMinLow,0); int digits = MarketInfo (symbol,MODE_DIGITS); double spreadFlat = highLine - lowLine; int directionFlat = -1; int slew = 0; for (int i = 0; i<size; i++){ double hl =arrayMinLow[i][0]; double ol = arrayMinLow[i][1]; double cl = arrayMinLow[i][2]; double ll = arrayMinLow[i][3]; if (hl == highLine || ol == highLine){ //вот тут не срабатывает if( directionFlat == -1 || directionFlat == 0) slew++; directionFlat = 1; }else if (cl == lowLine|| ll ==lowLine){ if( directionFlat == -1 || directionFlat == 1) slew++; directionFlat = 0; } } if(slew >=4 ) return true; return false; }video link https://www.youtube.com/watch?v=k9Zo0SgrMCA
Is it possible to link three charts with different timeframes in the EA? Based on the indicator readings in two charts, a place and currency pair to enter is found, and based on the last third chart, an entry point, stop and profit are calculated, and a position is opened for entry. Is this technically possible? Or do you need to create an Expert Advisor specifically for a certain timeframe to work in one chart? We should not only count the readings of bars, ticks or candlesticks from charts of different timeframes, but analyze the readings of at least two indicators and open an order based on the third one.
Hello, I was writing a function for detecting flytags and got stuck in something that I do not understand. if statement does not work. maybe I wrote something wrong somewhere, I want you to take a fresh look, because I do not understand why. I even recorded a video from the debugger, showing that the values are equal, but it does not work. please put my brain in the place of))))
code:
{
int size = ArrayRange(arrayMinLow,0);
int digits = MarketInfo (symbol,MODE_DIGITS);
double spreadFlat = highLine - lowLine;
int directionFlat = -1;
int slew = 0;
for (int i = 0; i<size; i++){
double hl =arrayMinLow[i][0];
double ol = arrayMinLow[i][1];
double cl = arrayMinLow[i][2];
double ll = arrayMinLow[i][3];
if (hl == highLine || ol == highLine){ //вот тут не срабатывает
if( directionFlat == -1 || directionFlat == 0)
slew++;
directionFlat = 1;
}else if (cl == lowLine|| ll ==lowLine){
if( directionFlat == -1 || directionFlat == 1)
slew++;
directionFlat = 0;
}
}
if(slew >=4 )
return true;
return false;
}
{ int size = ArrayRange(arrayMinLow,0); double spreadFlat = highLine - lowLine; int directionFlat = -1; int slew = 0; for (int i = 0; i<size; i++){ double hl =arrayMinLow[i][0]; double ol = arrayMinLow[i][1]; double cl = arrayMinLow[i][2]; double ll = arrayMinLow[i][3]; if (hl == highLine || ol == highLine){ //вот тут не срабатывает if( directionFlat == -1 || directionFlat == 0) slew++; directionFlat = 1; }else if (cl == lowLine|| ll ==lowLine){ if( directionFlat == -1 || directionFlat == 1) slew++; directionFlat = 0; } } if(slew >=4 ) return true; return false; }video link https://www.youtube.com/watch?v=k9Zo0SgrMCA
I can't delete the previous post, I copied everything into html and removed the tag I need to edit the post