Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

jjthetrader

TradeStation Strategy Code Help

Recommended Posts

I'm running a TradeStation strategy to trade the S&P emini.

I use SetProfitTarget and SetStopLoss for my orders.

 

As soon as the profit target is reached, lets say 1 point, the strategy shows Profit Target on the screen at that point. But in real life the price needs to reach 1 tick higher to actually get me out with the profit target.

 

My question is if the price only gets to the profit target amount and not 1 tick higher to actually get me out, will my strategy know I'm still in, even though it's not, and set my Stop if it happens to reverse on me? Or will my strategy think I'm out and fail to set that stop?

 

I was running on auto all month and this is only occuring to me now but this scenario hasn't actually happened for me to know for sure.

 

Any help would be appreciated.

Share this post


Link to post
Share on other sites

HI,

The SetProfitTarget (Amount of profit in dollars, at which point the position will be closed) and

 

SetStopLoss(Amount of loss, in dollars, at which point the position will be closed) will close the Position immediately. If you want your Positions to be closed 1 tick Higher , then You need to rewrite your exits.

 

Another Option is:-

 

You can add the dollar value of 1 tick with the Profit. I.e

 

SetProfitTarget(2000 + 12.5) where 12.5 is the 1 Tick value of The selected Stock.

This will exit at the Next Tick after reaching the Profit of 2000.

 

GoodLuck

EasyTrader_I

Share this post


Link to post
Share on other sites
I'm running a TradeStation strategy to trade the S&P emini.

I use SetProfitTarget and SetStopLoss for my orders.

 

As soon as the profit target is reached, lets say 1 point, the strategy shows Profit Target on the screen at that point. But in real life the price needs to reach 1 tick higher to actually get me out with the profit target.

 

My question is if the price only gets to the profit target amount and not 1 tick higher to actually get me out, will my strategy know I'm still in, even though it's not, and set my Stop if it happens to reverse on me? Or will my strategy think I'm out and fail to set that stop?

 

I was running on auto all month and this is only occuring to me now but this scenario hasn't actually happened for me to know for sure.

 

Any help would be appreciated.

 

 

You have 2 options to make sure that your Strategy is in Sync with your real world position. Under the Strategy Properties Tab you can set the strategy to:

 

1. Replace a Strategy Limit order with a Market order XXX seconds after the strategy thinks the fill has occured

 

-or-

 

2. Set the Strategy to fill non-historical orders only when he TradeManager reports them as filled.

 

Either choice will make sure you are out when your target is hit.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.