WindowPriceMax() & WindowPriceMin() don't change if MT4 is minimized - page 2

 

Nothing wrong with WindowPriceMin(0) and WindowPriceMax(0) Your indicator was wrong

it didn't change LastMin and LastMax when LastMin became greater or when LastMax became lower

With the change I made to the indicator it is allerting correctly

 
deVries:

Nothing wrong with WindowPriceMin(0) and WindowPriceMax(0) Your indicator was wrong

it didn't change LastMin and LastMax when LastMin became greater or when LastMax became lower

With the change I made to the indicator it is allerting correctly

I think you don't get what RaptorUK aim at.
 
onewithzachy:
I think you don't get what RaptorUK aim at.


Trie the changed indicator on the previous page I posted......

Tell me then if I'm wrong

 
deVries:


Trie the changed indicator on the previous page I posted......

Tell me then if I'm wrong

That's my first replied to RaptorUK and he replied back explain it more. Would you please re-read from beginning.
 
onewithzachy:
That's my first replied to RaptorUK and he replied back explain it more. Would you please re-read from beginning.

IF you then test this....
Files:
 
deVries:

Nothing wrong with WindowPriceMin(0) and WindowPriceMax(0) Your indicator was wrong

it didn't change LastMin and LastMax when LastMin became greater or when LastMax became lower

With the change I made to the indicator it is allerting correctly


That is correct . . . but the question is why didn't it ?

Your code suffers from the same problem as mine . . . you need to wait longer while it is minimized then you will understand the issue.

 

I don't have time right now, but RaptorUK how about trying this :

Instead main chart CI how about sub-chart CI without property max min chart, just like MACD. The CI will draw line/histo on bar 0, which it's value is increased say 10 point on every tick. Now, attach 2 of it, and one of the sub chart is vertically resized to the most minimum (or until the WindowIsVisible() return false), and the other is not. Is there any alert ?. I don't know, I don't have time to investigate it, but my guess is not.

 

Waited longer this is the difference

2012.04.13 20:36:23 WindowMaxMin GBPUSDmicro,M1: PriceMin1 1.5841 PriceMax1 1.5865 your coding

2012.04.13 20:36:23 WindowMaxMin2 GBPUSDmicro,M1: PriceMin2 1.5849 PriceMax2 1.5853 the one with my changing

How great the window is depends on the maximumprice of the bars and the minimumprice of the bars on the chart

the version of you is not correcting himself when lowest or highest get off the chart.... You get only alert when lowest becomes lower

if that lowest is lower then WindowPriceMin( ) then ofcours when price becomes lower then WindowPriceMin( ) you won't get alert

You alert only yourself if it becomes lower then PriceMin

   Print("PriceMin2  ", LastMin,"  ",WindowPriceMin(0),"   PriceMax2  ", LastMax,"  ",WindowPriceMax(0));
Trie it out with this checkingline....
 

I think my last reply was a few hours ago. And I did not think about this topics, but you know, sometime you doing something and you get the answer of the other thing. deVries, I think you right. Now I don't know what RaptorUK aim at.

:|

 
deVries:

Waited longer this is the difference

2012.04.13 20:36:23 WindowMaxMin GBPUSDmicro,M1: PriceMin1 1.5841 PriceMax1 1.5865 your coding

2012.04.13 20:36:23 WindowMaxMin2 GBPUSDmicro,M1: PriceMin2 1.5849 PriceMax2 1.5853 the one with my changing

How great the window is depends on the maximumprice of the bars and the minimumprice of the bars on the chart

the version of you is not correcting himself when lowest or highest get off the chart.... You get only alert when lowest becomes lower

if that lowest is lower then WindowPriceMin( ) then ofcours when price becomes lower then WindowPriceMin( ) you won't get alert

You alert only yourself if it becomes lower then PriceMin

Trie it out with this checkingline....


I think I see your point . . . . WindowPriceMin(0) can return a higher value and I don't alert if that happens . . . similar for WindowPriceMax(0), you are correct . . . but that isn't relevant to the point of this Indicator. The point of the Indicator was to test if WindowPriceMax and Min returned the correct values when MT4 is minimized.

The reason I chose to just check if WindowPriceMin was going lower and WindowPriceMax was going higher was to minimize problems with comparing doubles.

Reason: