Stefan,
I like your ideas. You've almost got it but the formula needs to establish the HHV(C,100) condition (as true) at some point in the previous 12 days, back 15 days ago. HHV by itself just returns a value that does nothing in this case.
You could add something like -
Ref(Alert(HHV(C,100)= C,12),-15) and add another condition that sets the 10-15% price pullback you're looking for.
Or try using the barssince() function, which seems more direct if you're trying to bracket this to a defined time period situation.
From MSWIN help: ============== Bars Since SYNTAX-- barssince( DATA ARRAY ) FUNCTION-- Calculates the number of bars (time periods) that have passed since DATA ARRAY was true.
Important: When using the barssince() function in an exploration, you must choose the "Load ___ Records" button in the Explorer Options dialog (see page Explorer OptionsExplorer Options and specify a value equal to the number of bars loaded in your chart; otherwise, the exploration results may not be accurate. =================
An example using this approach -
barssince(HHV(C,65)= C) <= 20 AND barssince(HHV(C,65)= C) >= 10 AND Valuewhen(1,HHV(C,65)= C,C) > C* 1.1 {or substitute the last line as --- Ref(HHV(C,65),-10) > C * 1.1}
I had a 6-8% hit rate w/ this exploration as written. Sharpen it up and let me know what you finally come up with. Good luck,
Craig |