How To Invest In Oil Stocks (Amibroker And Tradestation Code)

The strategy in plain English:

 

Buy on the close of November, sell on the close of May.

 

 

Click here for the original article.

 

Amibroker code:

 

Buy= Month()==12 AND Month()!= Ref(Month(),-1);

buyPrice=Ref(C,-1);

Sell= Month()==6 AND Month()!= Ref(Month(),-1);

sellPrice=Ref(Close,-1) ;

 

 

Tradestation code:

 

//First set your interval to Monthly bars
If month(date) = 11 then buy this bar at close;
If month(date) = 5 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.