So I am missing something .
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
Strategy Plot Sample
Collapse
X
-
Strategy Plot Sample
I want to convert my indicator to a Strategy and then add and Indicator plot as per the Strategy Plot Sample and do so to plot in panels 2 and 3. So I understand two copies of StrategyPlot would have to loaded. I imported the reference sample and changed the U.I Panel setting to 2 and 3 respectively. I don't understand how this code can work as is. And after loading it, I see it doesn't. What I don't get is how the Strategy values High[0] and Highs[1][0] values get associated with each separate indicator plot Series. The documentation says the Id is used to differentiate plots but it is not referenced anywhere.
So I am missing something .Tags: None
-
Hello Jerrywar,
The 1 or 0 in the StrategyPlot(0) and StrategyPlot(1), is the strategy plot ID, which you then assign the Highs[1][0], the high of the secondary series, to that specific plot.
Code:StrategyPlot(1).Value.Set(Highs[1][0]);
Perhaps I’m not understanding your question correctly, what is the issue you are having or what are you attempting to do which you are having trouble with? I have no issues with the StrategyPlot strategy.
I look forward to your reply.Alan P.NinjaTrader Customer Service
Comment
-
So now that it is plotting letting me expand upon this sample. How would the sample plot either in the Strategy or the Indicator plot an arrow/triangle/dot on crossing some unique level. My first impression is you can't do this from the strategy as you can't control where the draw goes. It would seem that to do it from the Indicator that it would have to reference values from the strategy calculation. I tried to code a reference to strategy public values but failed miserably. Can you provide some reference to how this is done.
Comment
-
Alan P.NinjaTrader Customer Service
Comment
-
Hello JerryWar,
You are correct and I was mistaken.
Yes, as long as you’ve exposed those data series, the strategy could access them.
I have provided a sample strategy and indicator written in NT8 which demonstrates this.
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Comment
-
Alan,
One related question. As I run the strategy I was trading manually on the Dom. When I cancelled an order
the Strategy Disabled. Is there some logical reason this happened i.e. expected behavior or Do I have a Problem ? As I found out earlier when it disables the plots are removed so I want to keep it enabled.
Comment
-
Hello JerryWar,
If your strategy submitted an entry order, profit target or stop loss, and you were to cancel one of these working orders, it would be expected the strategy would disable. You could work manual orders on the dom, which you could cancel, however you may not cancel a strategy order and expect the strategy to continue working.
Please let us know if you need further assistance.Alan P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by smartromain, 03-13-2024, 01:42 AM
|
5 responses
92 views
0 likes
|
Last Post
by AndreiBig
Today, 06:08 AM
|
||
Started by Noerclou, Today, 04:55 AM
|
0 responses
3 views
0 likes
|
Last Post
by Noerclou
Today, 04:55 AM
|
||
Started by llanqui, Yesterday, 09:59 AM
|
2 responses
17 views
0 likes
|
Last Post
by llanqui
Today, 04:00 AM
|
||
Started by ThoriSten, Today, 03:56 AM
|
0 responses
6 views
0 likes
|
Last Post
by ThoriSten
Today, 03:56 AM
|
||
Started by PhillT, 04-19-2024, 02:16 PM
|
3 responses
24 views
0 likes
|
Last Post
by mangel2000
Today, 03:04 AM
|
Comment