Please fix this indicator or EA - page 11

 

Trade on renko offline chart

mistaken request

Files:
 

Hi every one ( willim's + Demarker

Hi every one ,

Can any one help me to integrates Williams` Percent Range and DeMarker indecator's in one indexs pleas

thankx

----------------------------------------------------------------------

Ali

 

I wan't to put them in one window , thank u.

 

Need help

i need adaptive rsi to not repaint

 

150 LWMA cross w/ Alert...HELP!

hey all! I need some help in programming an MT4 indicator. Hewre's what I am looking for.

I would like an indicator that is based on price action cross of a 150 linear weighted moving average on the linear weighted close (HLCC/4).

Has nothing to do with other moving averages, just the cross of price action.

 

RSI retracement lines

Hi All,

I wish to add 2 lines showing a % retracement level from highest high and lowest low on the RSI.

My code shows in red, and the indic wont compile. I am stuck. Thanks in advance for your help.

#property indicator_separate_window

#property indicator_minimum 0

#property indicator_maximum 100

#property indicator_buffers 7

#property indicator_color1 DodgerBlue

//---- input parameters

extern int RSIPeriod=14;

extern int TrailStopPercent=20;

//---- buffers

double RSIBuffer[];

double PosBuffer[];

double NegBuffer[];

double Highest_RSI[];

double Lowest_RSI[];

double LongTrailBuffer[];

double ShortTrailBuffer[];

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

//| Custom indicator initialization function |

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

int init()

{

string short_name;

//---- additional buffers are used .

IndicatorBuffers(5);

SetIndexBuffer(0,RSIBuffer);

SetIndexBuffer(1,PosBuffer);

SetIndexBuffer(2,NegBuffer);

SetIndexBuffer(3,LongTrailBuffer);

SetIndexBuffer(4,ShortTrailBuffer);

//---- indicator line

SetIndexStyle(0,DRAW_LINE);

//---- trail lines

SetIndexStyle(3,DRAW_LINE);

SetIndexStyle(4,DRAW_LINE);

//---- name for DataWindow and indicator subwindow label

short_name="RSI("+RSIPeriod+")";

IndicatorShortName(short_name);

SetIndexLabel(0,short_name);

//----

SetIndexDrawBegin(0,RSIPeriod);

SetIndexDrawBegin(3,RSIPeriod);

SetIndexDrawBegin(4,RSIPeriod);

//----

return(0);

}

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

//| Relative Strength Index |

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

int start()

{

int i,counted_bars=IndicatorCounted();

double rel,negative,positive;

//----

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

//---- initial zero

if(counted_bars<1)

for(i=1;i<=RSIPeriod;i++) RSIBuffer=0.0;

//----

i=Bars-RSIPeriod-1;

if(counted_bars>=RSIPeriod) i=Bars-counted_bars-1;

while(i>=0)

{

double sumn=0.0,sump=0.0;

if(i==Bars-RSIPeriod-1)

{

int k=Bars-2;

//---- initial accumulation

while(k>=i)

{

rel=Close[k]-Close[k+1];

if(rel>0) sump+=rel;

else sumn-=rel;

k--;

}

positive=sump/RSIPeriod;

negative=sumn/RSIPeriod;

}

else

{

//---- smoothed moving average

rel=Close-Close;

if(rel>0) sump=rel;

else sumn=-rel;

positive=(PosBuffer*(RSIPeriod-1)+sump)/RSIPeriod;

negative=(NegBuffer*(RSIPeriod-1)+sumn)/RSIPeriod;

}

PosBuffer=positive;

NegBuffer=negative;

if(negative==0.0) RSIBuffer=0.0;

else RSIBuffer=100.0-100.0/(1+positive/negative);

i--;

//---- trail stop lines

Highest_RSI = MathMax(Highest_RSI,iRSI(NULL,0,RSIPeriod,Close,i));

Lowest_RSI = MathMin(Lowest_RSI,iRSI(NULL,0,RSIPeriod,Close,i));

LongTrailBuffer = Highest_RSI - Highest_RSI * (TrailStopPercent/100);

ShortTrailBuffer = Lowest_RSI + Lowest_RSI * (TrailStopPercent/100);

}

return(0);

}

 
Daniel77:
Hi All,

I wish to add 2 lines showing a % retracement level from highest high and lowest low on the RSI.

My code shows in red, and the indic wont compile. I am stuck. Thanks in advance for your help.

#property indicator_separate_window

#property indicator_minimum 0

#property indicator_maximum 100

#property indicator_buffers 7

#property indicator_color1 DodgerBlue

//---- input parameters

extern int RSIPeriod=14;

extern int TrailStopPercent=20;

//---- buffers

double RSIBuffer[];

double PosBuffer[];

double NegBuffer[];

double Highest_RSI[];

double Lowest_RSI[];

double LongTrailBuffer[];

double ShortTrailBuffer[];

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

//| Custom indicator initialization function |

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

int init()

{

string short_name;

//---- additional buffers are used .

IndicatorBuffers(5);

SetIndexBuffer(0,RSIBuffer);

SetIndexBuffer(1,PosBuffer);

SetIndexBuffer(2,NegBuffer);

SetIndexBuffer(3,LongTrailBuffer);

SetIndexBuffer(4,ShortTrailBuffer);

//---- indicator line

SetIndexStyle(0,DRAW_LINE);

//---- trail lines

SetIndexStyle(3,DRAW_LINE);

SetIndexStyle(4,DRAW_LINE);

//---- name for DataWindow and indicator subwindow label

short_name="RSI("+RSIPeriod+")";

IndicatorShortName(short_name);

SetIndexLabel(0,short_name);

//----

SetIndexDrawBegin(0,RSIPeriod);

SetIndexDrawBegin(3,RSIPeriod);

SetIndexDrawBegin(4,RSIPeriod);

//----

return(0);

}

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

//| Relative Strength Index |

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

int start()

{

int i,counted_bars=IndicatorCounted();

double rel,negative,positive;

//----

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

//---- initial zero

if(counted_bars<1)

for(i=1;i<=RSIPeriod;i++) RSIBuffer=0.0;

//----

i=Bars-RSIPeriod-1;

if(counted_bars>=RSIPeriod) i=Bars-counted_bars-1;

while(i>=0)

{

double sumn=0.0,sump=0.0;

if(i==Bars-RSIPeriod-1)

{

int k=Bars-2;

//---- initial accumulation

while(k>=i)

{

rel=Close[k]-Close[k+1];

if(rel>0) sump+=rel;

else sumn-=rel;

k--;

}

positive=sump/RSIPeriod;

negative=sumn/RSIPeriod;

}

else

{

//---- smoothed moving average

rel=Close-Close;

if(rel>0) sump=rel;

else sumn=-rel;

positive=(PosBuffer*(RSIPeriod-1)+sump)/RSIPeriod;

negative=(NegBuffer*(RSIPeriod-1)+sumn)/RSIPeriod;

}

PosBuffer=positive;

NegBuffer=negative;

if(negative==0.0) RSIBuffer=0.0;

else RSIBuffer=100.0-100.0/(1+positive/negative);

i--;

//---- trail stop lines

Highest_RSI = MathMax(Highest_RSI,iRSI(NULL,0,RSIPeriod,Close,i));

Lowest_RSI = MathMin(Lowest_RSI,iRSI(NULL,0,RSIPeriod,Close,i));

LongTrailBuffer = Highest_RSI - Highest_RSI * (TrailStopPercent/100);

ShortTrailBuffer = Lowest_RSI + Lowest_RSI * (TrailStopPercent/100);

}

return(0);

}

Got it to compile but it looks identical to regular Rsi.

Regards

 

could someone check my code of my EA and help me figure out the problem.

Dear programmers on the board.

i am a rookie programmer and trying to learn on how to include indicators into an EA.

now i have made an EA and trying to include an indicator. so far so good. it looks like it inputs the results from the indicator.

however when i run it through the tester. it does not sell or buy where it needs to. it sells, buys like a maniac.

i like to have it buy at when line goes up. sell when it goes down.

so please tell me where did i go wrong?

i included the EA and the indicator.

also this is for learning purpose only. i dont know if the indicator is actually copyrighted or will deliver good buys or sells. for me this is all learning experience. just need the help of a good teacher

thanks

Files:
 

Why Lines won't Propagate?

Any body know why this indicator won't propagate?

I got this on the web and it worked for a day or so. Coincidentally, MT4 upgraded to build 226 that day. Any connection? Is this happening to many indicators? Can someone who knows look at the code?

I was very intrigued by this indicator, but now I can't view it any more.

Thanks

Files: