Exit same day with 4% gain
Author: tedclimo
Creation Date: 12/5/2010 2:01 PM
profile picture

tedclimo

#1
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!
profile picture

Cone

#2
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.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).