Hi Guys,
I m trying a strategy where i place a buy stop or sell limit order based on certain criteria. The issue i am finding is that the order gets cancelled on the next bar & does not stay open so the order never fills & then the strategy stops.
Can anyone point me in the right direction as to what i should be doing to keep an order open. I have placed an example of some of the entry requirements for a sell and buy with regards to price to buy/sell below.
hoping someone can shed some light on the issue, thanks in advance.
if low crosses under EMA1 then
BUYentry = high
signal = 1
endif
if low crosses over EMA1 then
SELLentry = low
signal = 1
endif
IF not onmarket and xx AND xx and xx and xx THEN
BUY 2 Contracts at BUYentry stop
SET TARGET pPROFIT ---
SET STOP pLOSS ---
ENDIF
IF not onmarket and x AND x and x and x THEN
sellshort 2 Contracts at SELLentry limit
SET TARGET pPROFIT ---
SET STOP pLOSS --
ENDIF
Does it work as you want if you remove Not onmarket?
Pending orders always LAST one bar.
They must be placed again, each bar, till needed.
Removing Not onmarket as suggested by GraHal should do.