A Failed Bounce In The S&P 500 Or Nasdaq (Amibroker And Tradestation Code)

The strategy in plain English:

 

  1. Yesterday’s IBS was at least 0.6 or higher.
  2. Yesterday’s low was lower than the lowest low during the five days before.
  3. Today’s close is lower than yesterday’s close.
  4. Exit when the close is higher than yesterday’s high.

 

Click here for the original article.

 

Amibroker code:

 

Buy= ref(ibs,-1)>0.6 AND Ref(L,-1)<Ref(LLV(L,5),-2) AND C<Ref(C,-1) ;

buyPrice= C;

Sell= C>Ref(H,-1) ;

sellPrice= C ;

 

 

Tradestation code:

 

If IFF((H-L)<>0,((C-L))/(H-L),1)[1] >= 0.6 and
l[1] <=lowest(l,5)[1] and
c<c[1]
then buy this bar at close;
If c>h[1] then sell this bar at close;

 

Disclosure: We are not financial advisors. Please do your own due diligence and investment research or consult a financial professional. All articles are our opinions – they are not suggestions to buy or sell any securities.