Here's a start:
// ----- Sample Opening Range Breakout system --------
slip=TickSize*1;
NumContracts = 1;
PositionSize = NumContracts * MarginDeposit;
BuyLimit = TimeFrameGetPrice( "O", inDaily) *1.0033;
ShortLimit = TimeFrameGetPrice( "O", inDaily) *9967;
BuyCond1 = TimeNum() > 125500 AND TimeNum() < 150000;
BuyCond2 = Close > BuyLimit;
ShortCond1 = TimeNum() > 125500 AND TimeNum() < 150000;
ShortCond2 = Close < BuyLimit;
Buy = BuyCond1 AND BuyCond2;
BuyPrice = BuyLimit+slip;
Short = ShortCond1 AND ShortCond2;
ShortPrice = ShortLimit-slip;
SellCond = TimeNum() >= 153000;
Sell = SellCond;
Cover = SellCond;
SellPrice = Close-Slip;
CoverPrice = Close+Slip;
// END
I just can't get it to obey to only sell after 15:00, most of the trades do, but some don't??
Let me know if there's anything wrong with the code or if you know how to force a close at 15:00.
Also can't limit only to one trade per day...
Needs some work, but it's a start
// ----- Sample Opening Range Breakout system --------
slip=TickSize*1;
NumContracts = 1;
PositionSize = NumContracts * MarginDeposit;
BuyLimit = TimeFrameGetPrice( "O", inDaily) *1.0033;
ShortLimit = TimeFrameGetPrice( "O", inDaily) *9967;
BuyCond1 = TimeNum() > 125500 AND TimeNum() < 150000;
BuyCond2 = Close > BuyLimit;
ShortCond1 = TimeNum() > 125500 AND TimeNum() < 150000;
ShortCond2 = Close < BuyLimit;
Buy = BuyCond1 AND BuyCond2;
BuyPrice = BuyLimit+slip;
Short = ShortCond1 AND ShortCond2;
ShortPrice = ShortLimit-slip;
SellCond = TimeNum() >= 153000;
Sell = SellCond;
Cover = SellCond;
SellPrice = Close-Slip;
CoverPrice = Close+Slip;
// END
I just can't get it to obey to only sell after 15:00, most of the trades do, but some don't??
Let me know if there's anything wrong with the code or if you know how to force a close at 15:00.
Also can't limit only to one trade per day...
Needs some work, but it's a start