[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help coding Swing High/Low Extension



PureBytes Links

Trading Reference Links

Hi Everyone

I've written a showme analysis for identifying swing highs and lows but am
having a problem moving beyond this basic code. I am fairly new to EL
programming and I would like to request assistance in expanding the
following code.

My idea is rather simple...If one is looking at a swing high, for example, I
would like to extend the plot of the swing high to the right until one of
two things occur:

(1) price has exceeded the swing high at any time (price may not necessarily
indicate a new swing high) or

(2) a new swing high has occurred.

Similar conditions would apply for swing lows with the appropriate
directional changes.

I hope my idea was expressed clearly. Any help or comments would be greatly
appreciated.

Take Care

John

{Swing High and Low Showme

Style type: Right tick
Style weight: 1 }

Inputs: Strength(4);

Value1 = SwingHigh(1, High, Strength, Strength+1);
Value2 = SwingLow (1, Low, Strength, Strength+1);

if Value1 > 0 then Plot1[Strength](Value1, "High", 7, -1, 1);
if Value2 > 0 then Plot2[Strength](Value2, "Low", 4, -1, 1);