NexusFi: Find Your Edge


Home Menu

 





How to set a dinamic stop loss based on percent


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Astrogirl with 5 posts (2 thanks)
    2. looks_two ratfink with 4 posts (2 thanks)
    3. looks_3 gregid with 2 posts (2 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 9,198 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 11 posts
    2. attach_file 0 attachments




 
Search this Thread
  #11 (permalink)
Astrogirl
Milan/Italy
 
Posts: 51 since Oct 2013
Thanks Given: 25
Thanks Received: 12


Astrogirl View Post
Now I'm trying to use a trailing stop instead a stop loss. I am using this code:


else if (Position.MarketPosition == MarketPosition.Long && Median[0] == targetstep1)

{
SetTrailStop("", CalculationMode.Price, trailing1, false);
}


instead of:

{
SetStopLoss("", CalculationMode.Price, trailing1, false);
}


("targetstep1" is a determineted target price level and "trailin1" is an integer variable of a stop price)

It doesn't work... what's wrong with me?!


My assumption is that a trailing stop is not compatible with the stop loss already present in the strategy.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Warsh Confirmed 54-45 on PPI Day -- 97% Say He Holds in …
Prediction Markets & Event Contracts
Memorandum Watch: How the 60-Day MOU Framework Makes May …
Prediction Markets & Event Contracts
Cboe Launches BITVX Bitcoin Volatility Index and Unveils …
Prediction Markets & Event Contracts
OneChronos Launches First Combinatorial Auction FX Venue …
Currencies
Iran Airspace Collapses 18 Points to 15.5% While Hormuz …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
22 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
5 thanks
  #12 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 649 since Aug 2009
Thanks Given: 320
Thanks Received: 623

@Astrogirl
Again refer to NT help guide and you will see that:


Quoting 
Note: CalculationMode.Price is irrelevant for trail stops

Here is the direct link to this info:
NinjaTrader Version 7


Reply With Quote
Thanked by:




Last Updated on October 20, 2013


© 2026 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 - Downloads - Top
no new posts