NexusFi: Find Your Edge


Home Menu

 





Riskmanagement - Trailing Stop adjustment


Discussion in TradeStation

Updated
    1. trending_up 2,266 views
    2. thumb_up 5 thanks given
    3. group 1 followers
    1. forum 6 posts
    2. attach_file 1 attachments




 
Search this Thread

Riskmanagement - Trailing Stop adjustment

  #1 (permalink)
FutureTrader112
Amsterdam Netherlands
 
Posts: 34 since Aug 2020
Thanks Given: 10
Thanks Received: 16

Good evening all,

I have a little problem with the Trailing Stop Strategy in TS. I already tried to play with the option/values and checked other possibilities, but so far I couldnt find a solution. Iam trying to increase the Trailing Stop, because right now it closes my positions with only a small profit (see Screenshot). Its to close to the current price and I would like to have it like 25+ Pips away.

Does anyone have an idea or suggestion? Maybe another SL/TP from the Strategies provided by TS works better/more efficient?




Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Are there any eval firms that allow you to sink to your …
Traders Hideout
Deepmoney LLM
Elite Quantitative GenAI/LLM
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
 
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)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


FutureTrader112 View Post
Good evening all,

I have a little problem with the Trailing Stop Strategy in TS. I already tried to play with the option/values and checked other possibilities, but so far I couldnt find a solution. Iam trying to increase the Trailing Stop, because right now it closes my positions with only a small profit (see Screenshot). Its to close to the current price and I would like to have it like 25+ Pips away.

Does anyone have an idea or suggestion? Maybe another SL/TP from the Strategies provided by TS works better/more efficient?




You can post your code if you like. I'd avoid % Trailing stops, especially if you are backtesting. They are inaccurate unless you use 1 tick LIBB, which limits you to 6 months backtest.

Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
FutureTrader112
Amsterdam Netherlands
 
Posts: 34 since Aug 2020
Thanks Given: 10
Thanks Received: 16



kevinkdog View Post
You can post your code if you like. I'd avoid % Trailing stops, especially if you are backtesting. They are inaccurate unless you use 1 tick LIBB, which limits you to 6 months backtest.


Hi kevinkdog,

thanks for your quick reply.

The code is the following:

inputs:
PositionBasis( true),
FloorAmt( 50 ),
TrailingPct( 10 );


if PositionBasis then
SetStopPosition
else
SetStopShare;

SetPercentTrailing( FloorAmt, TrailingPct );

Thanks in advance!

Reply With Quote
  #4 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


FutureTrader112 View Post
Hi kevinkdog,

thanks for your quick reply.

The code is the following:

inputs:
PositionBasis( true),
FloorAmt( 50 ),
TrailingPct( 10 );


if PositionBasis then
SetStopPosition
else
SetStopShare;

SetPercentTrailing( FloorAmt, TrailingPct );

Thanks in advance!


You could try a larger value for TrailingPct.

BUT, are you backtesting with this? If so, it is likely to give misleading (overly optimistic) results.

Follow me on Twitter Reply With Quote
  #5 (permalink)
FutureTrader112
Amsterdam Netherlands
 
Posts: 34 since Aug 2020
Thanks Given: 10
Thanks Received: 16


kevinkdog View Post
You could try a larger value for TrailingPct.

BUT, are you backtesting with this? If so, it is likely to give misleading (overly optimistic) results.

Hi,

I tried some larger values for the TrailingPct, but it has no significant impact on the results. A simple TP doesnt have the effect I want, do you have maybe another idea for a trailing stop set up?

Yes, Iam using it for backtesting with a 60min Chart and the trades have an average holding period of 1.5 days.

Thanks in advance for your help and effort!

Reply With Quote
  #6 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


FutureTrader112 View Post
Hi,

I tried some larger values for the TrailingPct, but it has no significant impact on the results. A simple TP doesnt have the effect I want, do you have maybe another idea for a trailing stop set up?

Yes, Iam using it for backtesting with a 60min Chart and the trades have an average holding period of 1.5 days.

Thanks in advance for your help and effort!

You could try something like this:

//trailing stop
If marketposition=1 and openpositionprofit<maxpositionprofit-InputVar4 then sell next bar at market;
If marketposition=-1 and openpositionprofit<maxpositionprofit-InputVar4 then buytocover next bar at market;
end;

where InputVar4 is the dollar amount you want to trail. Note this is not a stop order, but rather a market order that gets placed at next bar open.

The way I've written it, the openpositionprofit is evaluated at end of every bar.

You could convert to a stop order if you wanted to.

So let's say you had InputVar4=1000

If maxpositionprofit never goes above 0, then when openpositionprofit drops below -1000, you will get exit signal

If maxpositionprofit hits 2500 then when openpositionprofit drops below 1500, you will get exit signal


Try is and see how it works for you.

Follow me on Twitter Reply With Quote
  #7 (permalink)
FutureTrader112
Amsterdam Netherlands
 
Posts: 34 since Aug 2020
Thanks Given: 10
Thanks Received: 16


kevinkdog View Post
You could try something like this:

//trailing stop
If marketposition=1 and openpositionprofit<maxpositionprofit-InputVar4 then sell next bar at market;
If marketposition=-1 and openpositionprofit<maxpositionprofit-InputVar4 then buytocover next bar at market;
end;

where InputVar4 is the dollar amount you want to trail. Note this is not a stop order, but rather a market order that gets placed at next bar open.

The way I've written it, the openpositionprofit is evaluated at end of every bar.

You could convert to a stop order if you wanted to.

So let's say you had InputVar4=1000

If maxpositionprofit never goes above 0, then when openpositionprofit drops below -1000, you will get exit signal

If maxpositionprofit hits 2500 then when openpositionprofit drops below 1500, you will get exit signal


Try is and see how it works for you.

Awesome! Thanks a lot for your quick help and effort.

I will try it during the weekend and will let you know how it works.

Reply With Quote




Last Updated on October 22, 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