![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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 can i get this parts (marked in red) on the graph?
I'm trying this:
int downs=0,ups=0;
for(int i=1;i<=dist;i++){
if(Close[i]>Open[i] && Open[i+1]>Open[i]){
downs++;
}
if(Close[i]<Open[1] && Open[i+1]<Close[i]){
ups++;
}
}
if(dows<ups){
return(false);
}else{
int b;
if(subindo == 2){
if(Open[0]>Open[1] || Close[0]>Close[1])
b++;
if(!ObjectCreate("fundo",OBJ_VLINE,0,Time[0],Close[0])){
if(GetLastError() == 4200)
ObjectCreate("fundo["+b+"]",OBJ_VLINE,0,Time[0],Close[0]);
if(GetLastError()!=0)
Print("Error N°:"+GetLastError());
}else{
if(!ObjectSet("Fundo",OBJPROP_COLOR,Red))
Print("error"+GetLastError());
}
}else{
return(false);
}
}
return(false);
}
But it doesn't returns me what i want. I want to get exactlywhen it starts to come up, but i have no idea about how to do it.
Can someone help me? =)