Below is some strategy code that should be entering trades more often than it is. It is trading aapl, I have included the strategy on both 5 min and 60 min aapl charts with the areas where it should be entering trades circled in red, with the underlined qualified entry bars...
here is the code:
Code: Select all
variables:
TickSize (MinMove/PriceScale);
[IntrabarOrderGeneration = true]
// open new positions
if (MarketPosition = 0 and barstatus(1) = 2 and Low >= Low[1] and High >= High[1]) then begin
Buy ("Enter Long") 300 Shares Next Bar At high stop;
end;
Value1 = Text_New(Date, Time, Low-TickSize, NumToStr(CurrentShares, 0));
// manage open orders
if MarketPosition = 1 then begin
Sell("Profit Target") 300 Shares Next Bar at (EntryPrice + 1) Limit;
Sell("Stop Loss") 300 Shares Next Bar at (EntryPrice-1) Stop;
end;
***Charts are attached, one is a 60 min and the other is a 5 minute chart.