
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
Hello,
I just tried to build a Fractalindicator that just draws an arrwow if the two bars right from them are formed, that because the usual fractalindiktor from the metatrader wich is shipped in gives often incorrect signals for drwaing a arrow or also to a usual buy or sell signal by a EA Script.
I now there is a shift parameter by the indicator, by really i dont now how to use it, i have test many ways but always it comes incorrect.
here is my simple indicator test, pleas can anybody tell me how i can reach it, that they will only draw a arrow into the v1 an 2 array?
#property copyright "mmm"
#property link "mmm"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//----Buffers
double v1[];
double v2[];
int init() {
//---- drawing settings
SetIndexArrow(0, 217);
SetIndexArrow(1, 218);
SetIndexStyle(0,DRAW_ARROW,STYLE_DOT,1,Red);
SetIndexBuffer(0, v1);
SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1,Blue);
SetIndexBuffer(1, v2);
return(0);
}
int start()
{
for(int i=0; i<Bars; i++)
{
double Fh=iFractals(NULL, 0, MODE_UPPER,i);
double Ft=iFractals(NULL, 0, MODE_LOWER,i);
if(Fh>0){
v1=Fh;
}
if(Ft>0){
v2=Ft;
}
}//for
return(0);
}
//+------------------------------------------------------------------+