So, how to put Cumulative profit graph (or other result's graph) in the chart in Strategy Analyzer?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Put Cumulative profit graph in the chart in Strategy Analyzer
Collapse
X
-
-
I tried to create an indicator, but I don't know how to associate indicator with strategy. This lead to error in indicator:
Code:Plot0.Set(Performance.AllTrades.TradesPerformance.Points.CumProfit);
I tried with
Code:DrawLine("MyCumProfit"+CurrentBar, false, 1, Performance.AllTrades.TradesPerformance.Percent.CumProfit, 0, Performance.AllTrades.TradesPerformance.Percent.CumProfit, Color.Gray, DashStyle.Dot, 1);
Comment
-
Hello alexstox,
You may want to just plot from within the strategy for the easiest way to do something like this so you do not have to worry about passing variables from your Strategy to your Indicator which can be difficult.
Here is an example of how you can Plot from within a strategy that you may view.
When running a strategy on a chart you may find the need to plot values onto a chart. If these values are internal strategy calculations that are difficult to migrate to an indicator, you can use the following technique to achieve a plot. NinjaTrader 8 With NinjaTrader 8 we introduced strategy plots which provide the abilityJCNinjaTrader Customer Service
Comment
-
Hello alexstox,
Nothing comes to mind to easily be able to do what you looking for. Drawing objects in a Strategy will be on the same scale and writing the values to a file in the Strategy Analyzer can run into issue with file accessing.
Is this something that you want visually? If you use the DrawText() method you should be able to Display the Cumulative Profit when your trades enters or exits.JCNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ninza33, Today, 07:16 AM
|
3 responses
13 views
0 likes
|
Last Post
by ninza33
Today, 09:01 AM
|
||
Started by foxtrott21, Today, 08:27 AM
|
0 responses
1 view
0 likes
|
Last Post
by foxtrott21
Today, 08:27 AM
|
||
Started by jaypelle3, Today, 08:26 AM
|
0 responses
1 view
0 likes
|
Last Post
by jaypelle3
Today, 08:26 AM
|
||
Started by linkcou, Today, 07:01 AM
|
2 responses
24 views
0 likes
|
Last Post
by bltdavid
Today, 08:25 AM
|
||
Started by jaypelle3, Today, 08:25 AM
|
0 responses
6 views
0 likes
|
Last Post
by jaypelle3
Today, 08:25 AM
|
Comment