Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 ETFVoyageur, Today, 07:55 PM
|
0 responses
6 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:55 PM
|
||
Started by janio973, Today, 07:24 PM
|
1 response
7 views
0 likes
|
Last Post Today, 07:35 PM | ||
Started by aligator, 01-06-2022, 12:14 PM
|
4 responses
242 views
0 likes
|
Last Post
by john_44573
Today, 06:11 PM
|
||
Started by reynoldsn, Today, 05:56 PM
|
0 responses
13 views
0 likes
|
Last Post
by reynoldsn
Today, 05:56 PM
|
||
Started by bortz, 11-06-2023, 08:04 AM
|
51 responses
1,996 views
0 likes
|
Last Post
by aligator
Today, 05:50 PM
|
Comment