-
If the price is lower than the percentage from the first opening to the previous opening, close the position. Can you help implement it

-
Bear in mind ZigZag is constantly repainting on the current leg. To get the retracement % you need the high/low values, then you can get the %value, then decide what classes this value is being hit (current price/close). This line will show you how to get the % level. PERCENT1=LOW+0.2*(HIGH-LOW); OR PERCENT2=LOW+0.8*(HIGH-LOW); 0.2 and 0.8 represent the 20%, but as you are always subtracting a low number from a big number, there are times when things need to be reversed.
-
@jstap This is not a zigzag indicator