Risk Management In Trading (Amibroker Code)
The original article can be found here.
The logic in plain English:
- We buy S&P 500 when the 3-day RSI is below 20,
- We sell S&P 500 when the 3-day RSI is above 60.
Amibroker code:
setOption("holdminbars",1);
Buy = RSI(3)<20 ;
BuyPrice=Close;
Sell = RSI(3)>60 ;
SellPrice=Close;
ApplyStop(stopTypeLoss,stopModePoint,ATR(10)*2,1);
