Quote from ntfs:
Spydertrader,
Long time reader, first time poster. First and foremost, great job and thanks for all the work! Interesting thread. Second, has anyone converted this to Amibroker? I am having problems with totaling up the peaks and troughs. Also having problems coding the volume aspects.
Thank-you for the kind words. An individual, using the name Izeikl, sent me the following code nearly three years ago. I cannot speak to the efficacy of the code, but felt you might find it helpful. I apologize for the lack of completeness of the code, but it is all I had.
I performed a search on the Amibroker.com web site using the keyword "rank." the list of possibilities failed to include anything referencing Jack Hershey. However, several of the possibilities appeared to incorporate "user defined variables" counting back a certain period of time - which may point you in the correct direction. Sorry I couldn't provide you with additional assistance.
############
//This draws a graph of 6 or 8 day 20% + gains
//And adds commentary for start/end price
//It uses close for the workings
PrevSixPrice = Ref(Close,-6);
PrevEightPrice = Ref(Close,-8);
SixGain = (Close / PrevSixPrice * 100)-100;
EightGain = (Close / PrevEightPrice * 100)-100;
SixTwentyGain = IIf(SixGain > 20, SixGain, False);
EightTwentyGain = IIf(EightGain > 20, EightGain , False);
Plot(SixTwentyGain, "Six Day 20% Gainers", 5, 1);
Plot(EightTwentyGain , "Eight Day 20% Gainers", 4, 1);
WriteIf(SixGain>20, "6 Day %" + SixTwentyGain + " Gain.\nStart Price: " + PrevSixPrice + "\nEnd Price: " + Close,"");
WriteIf(EightGain >20, "\n8 Day %" + EightTwentyGain + " Gain.\nStart Price: " + PrevEightPrice + "\nEnd Price: " + Close,"");
##################
- Spydertrader