Please fix this indicator or EA - page 36

 

thank you for that explaination! that seems too hard for me to correct it. i hoped that there is just a missing... but that is way too much for my poor mql4-knowledge.

so i keep on working with horizontal lines

 

Could someone please help me(trendline question)

Hi guys, im trying to write a simple indicator for MT4 that plot a trend line from the previously fractal High to the current candle High and a trend line from the previously fractal Low the current candle Low..im new in mq4 so an help would be appreciated.. thanx in advance!!!!!

heres what i have so far...not sure if the code is correct.. apparently is not since when executed it plot lines in wrong positions

void MarkItDownX(int iBackBars, int iForwardBars)

{

// Other free stuff at Free Stuff Menu

int iHighIndex, iLowIndex;

double dHi, dLo;

datetime dtStart, dtEnd;

iFractals(NULL,PERIOD_M5,MODE_HIGH,iBackBars);

// Get high/low of last n periods

iHighIndex = iHighest(NULL, PERIOD_M5, MODE_HIGH, iBackBars, 1); //iFractals(NULL,PERIOD_M5,MODE_UPPER,iBackBars);

iLowIndex = iLowest(NULL, PERIOD_M5, MODE_LOW, iBackBars, 1); // iFractals(NULL,PERIOD_M5,MODE_LOWER,iBackBars);

dHi = iFractals(NULL,PERIOD_M5,MODE_UPPER,iHighIndex); // iHigh(NULL, PERIOD_M5, iHighIndex);

dLo = iFractals(NULL,PERIOD_M5,MODE_LOWER,iLowIndex); // iLow(NULL, PERIOD_M5, iLowIndex);

dtStart = TimeCurrent()-(iBackBars*300); // n*5 min bars

dtEnd = TimeCurrent()+(iForwardBars*300); // n*5 min bars

sstrCurrentUpLine = "X UP " + TimeToStr(TimeCurrent()); // Set current active line name

sstrCurrentDownLine = "X DN " + TimeToStr(TimeCurrent());

ObjectCreate(sstrCurrentUpLine, OBJ_TREND, 0, dtStart, dHi, dtEnd, High[0]);

ObjectSet(sstrCurrentUpLine, OBJPROP_COLOR, Red);

ObjectSet(sstrCurrentUpLine, OBJPROP_STYLE, STYLE_SOLID);

ObjectSet(sstrCurrentUpLine, OBJPROP_WIDTH, 2);

ObjectSet(sstrCurrentUpLine, OBJPROP_RAY, False);

ObjectCreate(sstrCurrentDownLine, OBJ_TREND, 0, dtStart, dLo, dtEnd, Low[0]);

ObjectSet(sstrCurrentDownLine, OBJPROP_COLOR, Blue);

ObjectSet(sstrCurrentDownLine, OBJPROP_STYLE, STYLE_SOLID);

ObjectSet(sstrCurrentDownLine, OBJPROP_WIDTH, 2);

ObjectSet(sstrCurrentDownLine, OBJPROP_RAY, False);

}

and i call the function with

MarkItDownX(20, 10);

thats what happen:

it seams the lower trendline start correctly but is not touching the Low[0]..the upper trendline is not even on the highest fractal...

well now that i look the pic better also the lower trendline is wrong it should touch the lower fractal which is the following one...

I know im close but maybe a little help?...

Files:
11b.gif  26 kb
11.gif  27 kb
 

Can anybody help with this indicator - it would be useful to other members

I included a post on page 35 of this thread. We have created an indicator that is not updating properly and would be grateful for any assistance to resolve this.active_boundaries_optimisedv4.mq4

 

active Boundaries indicator

thanks for your help with this. If anybody wants to use it, try putting the setting at 1440 on minute charts. It works best with other indicators on shorter time frames for exit. We have used it with the effective ratio indicator which we have developed - if you want it, we can post it up here.

 
Marbo:
hi forum,

Try this indi. it is nice

Files:
 

...

This one works as it should now. All the possible repainting issues removed

PS: since it largely depends on the first bar calculated (it cumulates values over all bars) be carefull how you use it : changing the number of calculated bars (simple time frame change back and forth) changes indicator values too

greatworth:
I included a post on page 35 of this thread. We have created an indicator that is not updating properly and would be grateful for any assistance to resolve this.active_boundaries_optimisedv4.mq4
 

Effective ratio indicator - please can you help again

Mladen, After your help yesterday we have found that our other indicator is not working as expected either. Unfortunately we are lacking the expertise to understand what is wrong. Is it possible that you could have a look at this?

The indicator jumps from a correct value to a very high one (in the thousands) instantly, then back to the correct value. And that is for the previous bar.

The indicator actually uses another indicator which I have also included.

This indicator takes Pascal Willeim's Effective Volume and sees the force of the volume moving each way.evratiov1.mq4evindicator2011v6noam.mq4

 

...

Try these out ...

greatworth:
Mladen, After your help yesterday we have found that our other indicator is not working as expected either. Unfortunately we are lacking the expertise to understand what is wrong. Is it possible that you could have a look at this?

The indicator jumps from a correct value to a very high one (in the thousands) instantly, then back to the correct value. And that is for the previous bar.

The indicator actually uses another indicator which I have also included.

This indicator takes Pascal Willeim's Effective Volume and sees the force of the volume moving each way.evratiov1.mq4evindicator2011v6noam.mq4
 

effective ratio - is there anybody who can help?

Further to my last post, I have been looking some more at the effective volume indicator included in the last post (as part of the effective ratio), and it looks as if the effective volume is not working properly. I suspect this is an updating properly, but if the effective volume is not working properly, then nor will the effective volume.

Would be really grateful if somebody would be kind enough to have a look at these. They are useful indicators in their own right (more can be found at effectivevolume dot eu).

 

effective ratio

thanks again mladen, our last posts crossed over. I will try out the indicators you posted.

Reason: