Requests & Ideas - page 231

 
nevar:
Hi Mladen, What do you think, pairtrade indicator calculated wrong?Or is it codeable?Thanks.

nevar

In my opinion the author of that indicator should completely recode it. Not going to go into details about the code, but there is simply too much stuff in it that code that should not be done the way it was done at all.

Other than that, those are simply 2 MACD lines drawn (with some lag added due to additional EMA smoothing of the fast value) in the same window and the difference of it drawn as a third value

 

Good Morning

I want this ea to work in 5 digit broker

4 digit broker roboforex is working fine

Thanks in advance

the ea was deleted cause it is a decompile code

sorry

 
dasssi:
Good Morning

I want this ea to work in 5 digit broker

4 digit broker roboforex is working fine

Thanks in advance

dasssi

That is a decompiled code. Do you have a normal, not decompiled code of that EA?

 

sorry i dont have it

 
dasssi:
sorry i dont have it

Will try to find the original

 

Hey, i want a code who use 3 "iCustom" to do one median line of 3 "icustom" averages lines, can anyone help me?

For exemple :[(icustom(NULL,0,"indicator1",0,pos)+ icustom(NULL,0,"indicator2",0,pos)+ icustom(NULL,0,"indicato3",0,pos))/3]

Thanks for your help.

 
bixwin:
Hey, i want a code who use 3 "iCustom" to do one median line of 3 "icustom" averages lines, can anyone help me?

For exemple :[(icustom(NULL,0,"indicator1",0,pos)+ icustom(NULL,0,"indicator2",0,pos)+ icustom(NULL,0,"indicato3",0,pos))/3]

Thanks for your help.

bixwin

You are doing it good

The only thing you have to change is the casing ("icustom" should be "iCustom") and then all should work just fine. So, it can be written something like this (the "3.0" at the end is "just in case" - metatrader sometimes treats all as integers when you put an integer value in an expression, and that is not what you want in this case) :

double median = (iCustom(NULL,0,"indicator1",0,pos)+

iCustom(NULL,0,"indicator2",0,pos)+

iCustom(NULL,0,"indicator3",0,pos))/3.0;

 

Mladen, thanks for your quick reply but I try that and don't work

#property copyright ""

#property link ""

#property indicator_chart_window

#property indicator_buffers 1

#property indicator_color1 Yellow

//---- input parameters

double ExtMapBuffer1[];

int ExtCountedBars=0;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

SetIndexStyle(0,DRAW_LINE);

SetIndexBuffer(0,ExtMapBuffer1);

SetIndexShift(0,MA_Shift);

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start()

{

double del=0;

double prev=0;

if(Bars<=1) return(0);

ExtCountedBars=IndicatorCounted();

//---- check for possible errors

if (ExtCountedBars<0) return(-1);

//---- last counted bar will be recounted

if (ExtCountedBars>0) ExtCountedBars--;

int pos=Bars-1;

if(ExtCountedBars>1) pos=Bars-ExtCountedBars-1;

//---- main calculation loop

while(pos>=0)

{

double median = (iCustom(NULL,0,"indicator1",0,pos)+

iCustom(NULL,0,"indicator2",0,pos)+

iCustom(NULL,0,"indicator3",0,pos))/3.0;

}

return(median);

}

//+------------------------------------------------------------------+

 
bixwin:
Mladen, thanks for your quick reply but I try that and don't work

#property copyright ""

#property link ""

#property indicator_chart_window

#property indicator_buffers 1

#property indicator_color1 Yellow

//---- input parameters

double ExtMapBuffer1[];

int ExtCountedBars=0;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

SetIndexStyle(0,DRAW_LINE);

SetIndexBuffer(0,ExtMapBuffer1);

SetIndexShift(0,MA_Shift);

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator deinitialization function |

//+------------------------------------------------------------------+

int deinit()

{

//----

//----

return(0);

}

//+------------------------------------------------------------------+

//| Custom indicator iteration function |

//+------------------------------------------------------------------+

int start()

{

double del=0;

double prev=0;

if(Bars<=1) return(0);

ExtCountedBars=IndicatorCounted();

//---- check for possible errors

if (ExtCountedBars<0) return(-1);

//---- last counted bar will be recounted

if (ExtCountedBars>0) ExtCountedBars--;

int pos=Bars-1;

if(ExtCountedBars>1) pos=Bars-ExtCountedBars-1;

//---- main calculation loop

while(pos>=0)

{

double median = (iCustom(NULL,0,"indicator1",0,pos)+

iCustom(NULL,0,"indicator2",0,pos)+

iCustom(NULL,0,"indicator3",0,pos))/3.0;

}

return(median);

}

//+------------------------------------------------------------------+

bixwin

what are the exact names of the indicators you you are going to use in calculation?

 

Hi, could someone kindly direct me to to a thread where I could find a working OCO/Stradle indi, been looking for using search function but not easy job, Thank you

Reason: