[amibroker] Re: Bottom Fishing

 

I have read the article. And the code for this trading strategy is below. The threshold values for buy and sell signals are from the article. But the author suggest that the best threshold values need to be determined for each stock on individual basis.

The default values he offered allegedly work well for SPY. I have tested them. And sometimes they give perfect entries but sometimes the entries are totally awful and the strategy often exits too early and misses 80% of the uptrend.

Run the optimization tool on your stocks of interest to determine the ideal threshold values. 
 
// BottomFishing.afl

returns = log(C)-Ref(log(C),-1);
AV = StDev(returns,20)*sqrt(252);
STO = 100*(Close - LLV(L,20))/(HHV(H,20)-LLV(L,20));

AV_Threshold = Optimize("AV", 0.05, 0.01,0.99,0.01);
STO_Buy_Threshold = Optimize("STO Buy", 15,10,20,1);
STO_Sell_Threshold = Optimize("STO Sell", 60, 50,80,1);

Buy = AV>AV_Threshold AND STO<STO_Buy_Threshold AND Close<MA(C,100);
Sell = AV<AV_Threshold OR STO > STO_Sell_Threshold;

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

PlotShapes(shapeUpTriangle*Buy,colorBrightGreen);
PlotShapes(shapeDownTriangle*Sell,colorRed);

__._,_.___

Posted by: smagre12@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (14)

Check out the automatic photo album with 3 photo(s) from this topic.
bottom fishing.jpg unnamed (1).png unnamed.png
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___

Related Posts


EmoticonEmoticon

:)
:(
=(
^_^
:D
=D
=)D
|o|
@@,
;)
:-bd
:-d
:p
:ng
:lv