Can 4% same day PT(daily bars) be coded for Simulation purposes(live trading not necessary)?
This MOC code works fine(in Simulation) to exit anytime there is a same day gain.
CODE:
Please log in to see this code.
Yet I can't resolve how to construct a same day Profit target for daily bars.
I tried code below, but it peeks. Any tips on how to code same day PT for Simulation purposes?
CODE:
Please log in to see this code.
Thanx in advance,
T!
Size:
Color:
It's not possible to BuyAtLimit to open a Position and SellAtLimit on the same bar without a tremendous peeking bias. You must break it down to an intraday simulation; even so, the limit exit must be programmed on the bar after the entry.
On the other hand, in real time, there's not problem with such an order. See AutoProfitLevel in the QuickRef.
Size:
Color: