How to set a dinamic stop loss based on percent (Page 2) - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

How to set a dinamic stop loss based on percent
Started:October 15th, 2013 (05:35 AM) by Astrogirl Views / Replies:1,858 / 11
Last Reply:October 20th, 2013 (09:22 AM) Attachments:0

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

How to set a dinamic stop loss based on percent

Old October 20th, 2013, 06:01 AM   #11 (permalink)
Trading Apprentice
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES, YM, NQ, FDAX
Astrogirl's Avatar
Posts: 49 since Oct 2013
Thanks: 25 given, 4 received

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

Old October 20th, 2013, 09:22 AM   #12 (permalink)
Elite Member
London, UK
Futures Experience: Intermediate
Platform: NinjaTrader, Julia
Favorite Futures: Ockham's razor
gregid's Avatar
Posts: 638 since Aug 2009
Thanks: 311 given, 586 received

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

Note: CalculationMode.Price is irrelevant for trail stops

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

Reply With Quote
The following user says Thank You to gregid for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > How to set a dinamic stop loss based on percent

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set up a daily stop loss? sunsun MultiCharts 7 December 13th, 2015 08:56 AM
Ninjatrader strategy for Trailing Stop and stop loss. skann NinjaTrader 2 August 20th, 2013 07:34 PM
Set Stop loss gerimo NinjaTrader Programming 3 May 24th, 2012 01:36 PM
How to set up a Stop (Limit) Loss order - Ninja Trader jdumanic NinjaTrader 2 June 7th, 2011 05:40 PM
"Stop If Bid" command for entry's and stop loss arjfca EasyLanguage Programming 4 October 7th, 2010 05:05 PM

All times are GMT -4. The time now is 10:23 AM.

Copyright © 2016 by 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.
no new posts

Page generated 2016-10-28 in 0.06 seconds with 19 queries on phoenix via your IP