Add alert + email + place tardes Zigzig indicator - page 6

 
rg1983:

but in case of unknown shift of previous bar : is that ok ?

High and Low.

I have tried with no success

No.

Value 1 in the place of the shift parameter means first closed bar. And so on

The same value will be returned by the iBarShift() but there is no need to call a function when all you want to do is to test the first closed bar

Use

High[1] and Low[1]

to check high and low of the first closed bar

 

if i use Low[1] in my above example the trade will be closed in the low of the bar 10H and not the low of the bar 9h.

 
rg1983:
if i use Low[1] in my above example the trade will be closed in the low of the bar 10H and not the low of the bar 9h.

rg1983

So what do you want to test : the current bar low or the first closed bar low?

If it is the current bar, then the index is 0

If it is the first closed bar, then the index is 1

 
mladen:

rg1983

So what do you want to test : the current bar low or the first closed bar low?

If it is the current bar, then the index is 0

If it is the first closed bar, then the index is 1

I understand but i want to get low high price of the first closed bar index 1 from the current bar 0 where the trade is opened.and maintain these prices ( Low and High) to use them as stop loss.

for example of buy order and stop loss :

First closed bar Low : 1.10

Open price at current bar : buy at 1.20

Next Bar low : 1.15

Next Bar low : 1.12

....

And so on

Next Bar low : 1.09 First closed bar low is reached so stop loss

The number of the bars between Open price at current barand the low of the first closed baris VARIABLE (Red bars)

I hope is is clear thanks

 
rg1983:

I understand but i want to get low high price of the first closed bar index 1 from the current bar 0 where the trade is opened.and maintain these prices ( Low and High) to use them as stop loss.

for example of buy order and stop loss :

First closed bar Low : 1.10

Open price at current bar : buy at 1.20

Next Bar low : 1.15

Next Bar low : 1.12

....

And so on

Next Bar low : 1.09 First closed bar low is reached so stop loss

The number of the bars between Open price at current barand the low of the first closed baris VARIABLE (Red bars)

I hope is is clear thanks

rg1983

As I told :

Low[1] == fist closed bar low

Low[0] == current (still opened) bar low

 

I get itLow

This is for 30 min TF

Thanks

 
rg1983:
I get itLow

This is for 30 min TF

Thanks

That is not for 30 minute time frame

Second parameter of the iBarShift() in your case is 0 which means current time frame, and Low[whatever number] means low of the current time frame

 

please i need an alert and pop up notification for this indicator . please confirm if it repaints. rhanks

Files:
 
henrykfx:
please i need an alert and pop up notification for this indicator . please confirm if it repaints. rhanks

henrykfx

That indicator is renamed SHI silver trend signal (this one : shi_silvertrendsig.mq4 ). And yes : it repaints (heavily) which makes it unsuitable for alerts

Files:
 
mladen:

That is not for 30 minute time frame

Second parameter of the iBarShift() in your case is 0 which means current time frame, and Low[whatever number] means low of the current time frame

You are totally right!

I have another request if possible : how can i get the ihighest and the ilowesr of a specific range example from 7pm to 1am asian session EST time 1 hour timeframe.

I tried with High[ihighest(ibarshift) it works when i fix count and start. But when hour change for example from 8am to 9am the count of bars changes so ihighest and ilowest value change accordingly.

Is there a way to store the first highest and ilowest values calculated and use them later on a condition or other functions? Thanks in advance