Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Plot variable take profit and stop loss
Collapse
X
-
Tags: None
-
hello, do code in NT7 or NT8?
This video introducing the NinjaScript editor is an excellent resource,
https://www.youtube.com/watch?v=K8v_...56536A44DD7105
Last edited by Emma1; 02-09-2020, 10:30 AM.
-
I would like to display in the chart, evolution of stop loss and Take profit. Can you help me please?
Comment
-
-
Comment
-
I would like to plot the stop loss and take profit in the chart. To plot as an indicator while the position is open. Do you understand?
Comment
-
Hello wagner4691,
Opening Chart Trader on a chart in NinjaTrader 8 would allow you to see any working orders such as a stop loss or a profit target.
Having Plot Executions in the Data Series window set to Text and marker would allow you to see execution markers on the chart.
If you are not wanting to open Chart Trader, you would need to add custom drawing objects to your chart from the strategy.
Chelsea B.NinjaTrader Customer Service
Comment
-
Thank you. I would like to see the evolution of Take profit and Stop loss of my strategy in the chart while position is open like an indicator. It will help me to analyse the back test and strategy performance. Is it possible something like plot stoploss ? How can I do it? In my strategy My SL and my TP change but I can not see the evolution it in the chart like an indicator for exemple. In the back test I can only see when the position is closed.
Comment
-
For exemple , if I have a strategy the work with breakeven and traling stop using ATR ( it is not about chart trader) an an TP using ATR I would use something like
profitTarget = Convert.ToInt32(Math.Round( ATR(14)[0] * 2 / TickSize));
stopLoss = Convert.ToInt32(Math.Round( ATR(14)[0] * 2 / TickSize));
SetStopLoss (CalculationMode.Ticks, stopLoss);
SetProfitTarget (CalculationMode.Ticks, profitTarget);
How can I plot in the chart the position os SL and TP while position is open?
Thank you
Comment
-
I would like to see the position of SL and TP in the chart while the position is open. I would like to plot the trailing stop and the trailing TP and not draw lines. Is it possible?
Comment
-
Is there some variable where I can get the value of SL or TP? You told about draw lines, How can I plot TP and SL with lines. Which parameter do I have to draw?
Comment
-
Hello wagner4691,
If you are changing the price of SetStopLoss() by calling this and supplying a new calculated price, also supply that price to a Draw.Line(). The parameter will be the startY and endY parameters.
If you want to get the price from the order, this is possible in OnOrderUpdate().
Chelsea B.NinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
44 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment