Does anyone know a better way than the below code to find the lowest price in the last 3 swing ends. My IF statement gets the job done but I am look for a more efficient way to code it. Would be nice if there was a lowest low function for swings. SwingPrice0= SWINGEND(gannswing(SWINGCOUNT=2, METHOD=Use Outside Bar), OFFSET=0); SwingPrice1 = OFFSET(SwingPrice0, OFFSET=1); SwingPrice2 = OFFSET(SwingPrice0, OFFSET=2); SwingPriceMinor = If(((SwingPrice2 < SwingPrice1) and (SwingPrice2 < SwingPrice0)), SwingPrice2, If(((SwingPrice1 < SwingPrice2) and (SwingPrice1 < SwingPrice0)), SwingPrice1, SwingPrice0));
Hi Michael,
You can still use Lowest Low but you have to specify the source that you want it to work over. This should get you the same result
GS2= SWINGEND(gannswing(SWINGCOUNT=2, METHOD=Use Outside Bar)); LOWESTLOW(GS2, BARS=3, INCBAR=True)
All the best
Mathew