Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
OVERVIEW:
• I’m trading the e-mini (ESZ16) with a custom TradeStation ELD entry strategy, which uses Buy / Sell ‘next bar at market’ entries.
and
• I’m using a ‘canned’ TradeStation strategy for Stop-Loss exits. Code for Stop-Loss exit is:
if PositionBasis then
SetStopPosition
else
SetStopShare;
SetStopLoss( Amount ) ;
• Occasionally (but not always) my strategy fill will be late by one tick. For example:
o Strategy calls for: ‘Short from 2091.75’
o Actual fill is: ‘Short from 2091.50’
• I know this because both Strategy-Fill and Actual-Fill are ‘called-out’ on my chart.
PROBLEM:
• My strategy-Stop is apparently tied to my strategy-Entry; as opposed to the actual fill. I say this because:
o When I’m filled per my entry strategy, my stop will exit properly ($125).
o When my actual fill is one- tick past my entry strategy fill (as in example above), my stop also extends by one tick; and my $125 stop becomes a $137.50 stop.
QUESTIONS:
1. How does TradeStation Stop-Loss code (above) interpret my fill position, in order to set the stop?
2. How may I link the Stop-loss to ‘Actual-fill’? Is there a key-word that may be added to the code to specify “actual position’ for stop placement?
the stop price is based on the entry price as shown on the chart - which explains the results you are having.
Take a look at the strategy automation tab under "Strategy Properties for all strategies on this Chart". There is an option to force the Strategy to fill (on the chart) non-historical orders only when the TradeManager reports them as filled.
You can read more about it in the official help.
Just wanted to let you know; I just took a trade with your suggested change to the TS Strategy Automation menu.
Based on your response, I selected the second radio-button: "Strategy will fill non-historical orders only when the TradeManager reports them as filled" and the second check-box: "Adopt the real-world position position for the current acount". Results were PERFECT.
Tradesation used my actual fill to calculate my Stop and Target strategy orders, and provided feedback as to filled and pending orders from their server. Best of all, I cleared $50 of profit!
Thanks again for your generous support to us novice ELD coders. I feel like I got something accomplished today. A great way to end the week!