Get Zigzag indicator high low values

 

Hi

 

 Can anybody help me how I can the low/high point of Zigzag indicator?

 I need to set the stop loss for my position when created by EA

 Assume my EA decide to open a position if it is buy I need previous Zigzag lowest point in M5

 or if it is a sell I need previous Zigzag highest point in M5

 Appreciate it

 

Mosn 

 
 
mhshasx:  Can anybody help me how I can the low/high point of Zigzag indicator?
  1. Loop your shifts until you get the first nonzero value
  2. Continue the loop until you get the next nonzero value.
  3. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
 

I found using envelopes indicator is easy for stop loss. Upper envelope as stop loss for sale and lower envelope as stop loss for buy. Adjust envelopes variable to get the best setting. But using any indicator for stop loss will have a problem OrderSend error 130 because stop loss will be higher or lower than ask/bid price when trending. Better using ratio 1:1 or 1:2.



mosnfx:

Hi

 

 Can anybody help me how I can the low/high point of Zigzag indicator?

 I need to set the stop loss for my position when created by EA

 Assume my EA decide to open a position if it is buy I need previous Zigzag lowest point in M5

 or if it is a sell I need previous Zigzag highest point in M5

 Appreciate it

 

Mosn