NexusFi: Find Your Edge


Home Menu

 





Strategy automation problem


Discussion in TradeStation

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




 
Search this Thread

Strategy automation problem

  #1 (permalink)
Donovan2580
Port St. Lucie, FL
 
Posts: 36 since Jul 2016
Thanks Given: 22
Thanks Received: 37

Hello,

I have a quick question that I am hoping someone can help me with.

I have an automated strategy in which I have a profit target and stop loss.

When trading in sim mode (Not real money, but sim money) my fills sometimes match my target but not always.

I have my profit target set at $200.00 and sometimes it will get filled and I end up with 2 ticks higher or lower.

I know it is not a slippage issue because it is Emini and I can see there are no gaps.

Here is how I have the automation page set up. Can anyone see a problem with my settings that would cause this?

Thanks in advance,

Donovan





Also Here is the code I am using:

Profit Target Code:

[IntrabarOrderGeneration = false]
inputs: Target( 200 ) ;

Variables:
PositionBasis( TRUE );


if PositionBasis then
SetStopPosition
else
SetStopShare ;

SetProfitTarget( Target ) ;



___________

Stop Loss Code:


[IntrabarOrderGeneration = false]
inputs: Amount( 200 ) ;
Variable:
PositionBasis( TRUE );

if PositionBasis then
SetStopPosition
else
SetStopShare ;

SetStopLoss( Amount ) ;

Reply With Quote
Thanked by:




Last Updated on January 24, 2020


© 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