Coding help - page 342

Dawid Ciechowski
294
Dawid Ciechowski  
mladen:
You can not change that (make it not delay). Otherwise it would need to know at least the half of the bars needed for pastern recognition from the future, and that is not possible.

http://www.forexmt4.com/mt_yahoo/Pattern_Hammer_Shooting_Star.mq4 - but in this one it's possible... I know that there is a way to fix it, because it works in a similar indicators, but here something is wrong with the code...

Mladen Rakic
181955
Mladen Rakic  
freakout:
http://www.forexmt4.com/mt_yahoo/Pattern_Hammer_Shooting_Star.mq4 - but in this one it's possible... I know that there is a way to fix it, because it works in a similar indicators, but here something is wrong with the code...

From what I see, that one too is showing the patterns with at least 1 bar delay. The more you go to more complicated paters (which that indicator is not able to recognize at all) the bigger the odds are that the delay will have to be bigger too

Dawid Ciechowski
294
Dawid Ciechowski  
mladen:
From what I see, that one too is showing the patterns with at least 1 bar delay. The more you go to more complicated paters (which that indicator is not able to recognize at all) the bigger the odds are that the delay will have to be bigger too

no, it appears immediately after candle close if shift value is equal to 1 when shift=2 then you have a 1 bar delay I've checked it multiple times and the only problem in my indicator is that when I change shift=2 to shift=1 it moves everything by 1 candle to the right - not to the left, so something is wrong...

Mladen Rakic
181955
Mladen Rakic  
freakout:
no, it appears immediately after candle close if shift value is equal to 1 when shift=2 then you have a 1 bar delay I've checked it multiple times and the only problem in my indicator is that when I change shift=2 to shift=1 it moves everything by 1 candle to the right - not to the left, so something is wrong...

I don't know what indicator are you talking about now

If you are talking about the one from the link, if you take a look at this part of the code :

shift1 = shift + 1;

shift2 = shift + 2;

shift3 = shift + 3;

shift4 = shift + 4;

You will see that (due to that "+1" part in the first line) it always lags at least 1 bar. Try changing the 1,2,3,and 4 to 0,1,2 and 3 (who knows, might work). If you find similar part of code in the other try to do the same thing with it too

Triip
40
Triip  

I found a nice Murrey Math indicator but those lines over the screen is little bit disturbing and I would like to cut those horizontal lines with RAY. I tried to add "ObjectSet(buff_str, OBJPROP_RAY, false);" but it didn't work out.

So maybe someone can help me out?

Files:
emmany4
130
emmany4  

Hello Mladen, thanks for all your help in this forum. Pls can U help to make this indicator to work with the EA, to buy, sell and close positions when the arrow shows up. I intend to use the indicator settings in MTF mode in a particular time frame which has proved not to repaint.

Thanks in advance.

Gway
265
Gway  

Mladen, I don't know how to resolve this situation.

Help me please if you have time.

Thanks!

For example:

When Buffer = 3, Buffer = 2, Buffer = 1, Buffer = 1, Buffer = 1, Buffer = 1; "max" data is correct.

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

int Lines_Break = 3;

int j = i; while (Buffer [j + 1] == Buffer [j + 2]) j ++;

double max = Buffer [ArrayMaximum (Buffer, Lines_Break, j + 1)];

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

However, this time when the array becomes: Buffer = 3, Buffer = 2, Buffer = 2, Buffer = 2, Buffer = 2, Buffer = 1; "max" data is wrong.
Mladen Rakic
181955
Mladen Rakic  
Anyway:
Mladen, I don't know how to resolve this situation.

Help me please if you have time.

Thanks!

For example:

When Buffer = 3, Buffer = 2, Buffer = 1, Buffer = 1, Buffer = 1, Buffer = 1; "max" data is correct.

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

int Lines_Break = 3;

int j = i; while (Buffer [j + 1] == Buffer [j + 2]) j ++;

double max = Buffer [ArrayMaximum (Buffer, Lines_Break, j + 1)];

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

However, this time when the array becomes: Buffer = 3, Buffer = 2, Buffer = 2, Buffer = 2, Buffer = 2, Buffer = 1; "max" data is wrong.

You are testing only 3 elements (Lines_break elements) and your start position (j+1 expression) should be i - no need to alter it. I am assuming that n this case you are working with buffer, not an array)

Gway
265
Gway  
mladen:
You are testing only 3 elements (Lines_break elements) and your start position (j+1 expression) should be i - no need to alter it. I am assuming that n this case you are working with buffer, not an array)

How do I put equal Buffer into a unit?

For example: "Buffer = Buffer = Buffer = Buffer "

Mladen Rakic
181955
Mladen Rakic  
Anyway:
How do I put equal Buffer into a unit? For example: "Buffer = Buffer = Buffer = Buffer "

Anyway

As I see from your code you do not need that. You are looking for a maximal value. If there is n maximal values or just one, it does not matter. The important is that the maximal value is identified