NexusFi: Find Your Edge


Home Menu

 





How does TradeStation Stop-Loss Strategy interpret Entry Position?


Discussion in TradeStation

Updated
    1. trending_up 2,459 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

How does TradeStation Stop-Loss Strategy interpret Entry Position?

  #1 (permalink)
Vientomarsol
Port St. Lucie, FL.
 
Posts: 25 since May 2016
Thanks Given: 17
Thanks Received: 9

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:

[IntrabarOrderGeneration = false]
inputs:
PositionBasis (TRUE),
Amount (125);

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?

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Futures True Range Report
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

Vientomarsol,

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.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
Vientomarsol
Port St. Lucie, FL.
 
Posts: 25 since May 2016
Thanks Given: 17
Thanks Received: 9


ABCTG,

Thanks much for your very prompt response.

Looks like your suggestion will resolve my issue.

Reply With Quote
  #4 (permalink)
Vientomarsol
Port St. Lucie, FL.
 
Posts: 25 since May 2016
Thanks Given: 17
Thanks Received: 9

ABCTG,

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!

Respectfully,

Vientomarsol

Reply With Quote
Thanked by:
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

Vientomarsol,

thank you for the feedback, I am glad to hear that it's working the way you want it.

Have a great weekend.

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on November 4, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts