HI All,
I am trying to esteblish the last support or resistance.
This is defined as (seen from bar) 2 lower highs in the future and 4 consectutive higher highs in past.
Only the last support and resistance are worthwhile, so I thought to make a for () loop going backwards. Starting from the last till say 50 days ago.
The for statement throws an exception which i do not understand. The loop statement should work according Microsoft C# documentation and other examples from the web.
the code
CODE:
Please log in to see this code.
I need a hint to make this work.
Anyone the help or fix?
thanks in advance
Hugo
Size:
Color:
The bars in the chart are numbered from 0 to Bars.Count - 1 (typical array indexes in C#). So, bar_begin needs to be Bars.Count - 3 so that you can look ahead 2 bars.
Size:
Color:
Cone,
thnx for the prompt reply, It works :). I can figure the rest of the code. C# (sharp is really sharp -2 and -3)
Size:
Color: