_SECTION_BEGIN("Taiki's Swing System");
H1 = TimeFrameGetPrice("H",inDaily,-1); // High Day -1
H2 = TimeFrameGetPrice("H",inDaily,-2); // High Day -2
H3 = TimeFrameGetPrice("H",inDaily,-3); // High Day -3
L1 = TimeFrameGetPrice("L",inDaily,-1); // Low Day -1
L2 = TimeFrameGetPrice("L",inDaily,-2); // Low Day -2
L3 = TimeFrameGetPrice("L",inDaily,-3); // Low Day -3
Hi = (H1 + H2 + H3)/3;
Lo = (L1 + L2 + L3)/3;
Buy = Cross(H,Hi); // Price crosses 3 Day Avg of High
Sell = Cross(L1,L); // Price crosses previous day Low
Short = Cross(Lo,L); // Price crosses 3 Day Avg of Low
Cover = Cross(H,H1); // Price crosses previous day High
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);
BuyPrice = Hi;
SellPrice = L1;
ShortPrice = Lo;
SellPrice = H1;
SetPositionSize(1,4);// testing for 1 share only ( to get profit/loss value in number of points)
Plot(Hi,"Avg3H",colorGreen,styleStaircase);
//Plot(Hi-20,"BuySL",colorGreen,styleStaircase|styleDashed);
Plot(Lo,"Avg3L",colorRed,styleStaircase);
//Plot(Lo+20,"ShortSL",colorRed,styleStaircase|styleDashed);
_SECTION_END();