Day Trading Strategy (Amibroker And Tradestation Code)
The original article can be found by clicking here.
The strategy in plain English:
- We short at the open on the last trading day of the month (not a calendar day, but a trading day).
- We cover at the close.
Amibroker code:
Short= month()!=Ref(Month(),1) ;
shortPrice=Open;
Cover= C>0;
coverPrice=Close ;
Tradestation code:
{
Strategy - day trading - short end of month
https://www.quantifiedstrategies.com/lessons/day-trading-strategy-amibroker-code/
}
if TdaysTillMonthEnd = 1 Then
sellshort next bar on open;
if TdaysTillMonthEnd = 0 Then
Buytocover this bar on close;
