k = StochK( 14 , 14);
d = StochD( 14 , 14, 14);
Buy = Cover = Cross(k, d) AND Close > MA(Close,50);
Sell = Short = Cross(d, k) AND Close > MA(Close,50);
_SECTION_BEGIN("Arsh");
Param_LotSize = Param("Lot Size (used for backtesting only)", 1,1,5000,1);
Param_Margin = Param("Margin required (used for backtesting only)", 15,0.001,100,0.001);
Param_NoOfLots = Param("No of lots normally traded (used for backtesting only)",1,1,10000,1);
k = StochK( 14 , 14);
d = StochD( 14 , 14, 14);
Plot(C,"",colorBlue,styleCandle);
Buy = Cover = Cross(k, d) AND Close > MA(Close,50);
Sell = Short = Cross(d, k) AND Close > MA(Close,50);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
PlotShapes(shapeUpArrow*Buy,colorGreen, 0, L, Offset=-45);
PlotShapes(shapeDownArrow*Short,colorOrange, 0, H, Offset=-45);
//Settings for Backtester
SetOption("AllowSameBarExit", False);
SetOption("AllowPositionShrinking", False);
SetOption("FuturesMode", True);
SetOption("InterestRate",0);
SetOption("MaxOpenPositions",1);
RoundLotSize = Param_LotSize;
SetOption("MinShares",RoundLotSize);
SetOption("PriceBoundChecking",False);
//SetOption("CommissionMode",3);
//SetOption("CommissionAmount",12.5/RoundLotSize);
SetOption("AccountMargin",Param_Margin);
SetOption("ReverseSignalForcesExit",True);
SetOption("UsePrevBarEquityForPosSizing",True);
//ApplyStop(stopTypeTrailing, stopModePoint, DTSL, True, True );
PositionSize = C*RoundLotSize*Param_NoOfLots;
SetTradeDelays(0,0,0,0);
BuyPrice = Close;
SellPrice = Close;
ShortPrice = Close;
CoverPrice = Close;
//End of Settings for Backtester
_SECTION_END();
www.************
_SECTION_BEGIN("Arsh");
Param_LotSize = Param("Lot Size (used for backtesting only)", 1,1,5000,1);
Param_Margin = Param("Margin required (used for backtesting only)", 15,0.001,100,0.001);
Param_NoOfLots = Param("No of lots normally traded (used for backtesting only)",1,1,10000,1);
k = StochK( 14 , 14);
d = StochD( 14 , 14, 14);
Plot(C,"",colorBlue,styleCandle);
Buy = Cover = Cross(k, d) AND Close > MA(Close,50);
Sell = Short = Cross(d, k) AND Close > MA(Close,50);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
PlotShapes(shapeUpArrow*Buy,colorGreen, 0, L, Offset=-45);
PlotShapes(shapeDownArrow*Short,colorOrange, 0, H, Offset=-45);
//Settings for Backtester
SetOption("AllowSameBarExit", False);
SetOption("AllowPositionShrinking", False);
SetOption("FuturesMode", True);
SetOption("InterestRate",0);
SetOption("MaxOpenPositions",1);
RoundLotSize = Param_LotSize;
SetOption("MinShares",RoundLotSize);
SetOption("PriceBoundChecking",False);
//SetOption("CommissionMode",3);
//SetOption("CommissionAmount",12.5/RoundLotSize);
SetOption("AccountMargin",Param_Margin);
SetOption("ReverseSignalForcesExit",True);
SetOption("UsePrevBarEquityForPosSizing",True);
//ApplyStop(stopTypeTrailing, stopModePoint, DTSL, True, True );
PositionSize = C*RoundLotSize*Param_NoOfLots;
SetTradeDelays(0,0,0,0);
BuyPrice = Close;
SellPrice = Close;
ShortPrice = Close;
CoverPrice = Close;
//End of Settings for Backtester
_SECTION_END();
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
J | Scope for trading Crude Oil | Energy | 6 | |
Need highest margin broker for crude oil trading | Brokers & Trading Platforms | 0 | ||
Helmet Hermit's Trading Diary 2020 Equity futures(Single Stock) and Crude oil | Trading Diary | 57 | ||
S | Crude oil trading diary II | Trading Diary | 13 | |
Monkey King's Oily Tales (Day Trading Crude Oil) | Energy | 205 |