[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

True/False Order



PureBytes Links

Trading Reference Links

In strategy with pyramiding enabled I am getting a buy and exit at same
price on same bar.
This happens when the price gaps as the <Buy Condition Stop> and the <Exit
Condition Limit> are both less than the Open and therefore are filled at the
Open. I don’t mind if the they are both filled within the same bar at
different prices (as this would reflect actual trading on daily bars). My
question is I want to insert a BuyOK (True or False) condition as a filter.

Would this be determined to be True whenever the position is flat OR only if
the order is filled at the OrderPrice. If the latter how can I have a
True/False switch ONLY when the order is filled.


{Initial Entry}
If  MarketPosition = 1 then begin
    IF Condition1 then Buy("Trnd 1") at OrderPrice stop;
    BuyOK = True;
end;




Mel
melsmail@xxxxxxxxxxx