Is there a way to use AddHeikenAshi() without hard coding the instrument in the parameters?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Using the AddHeikenAshi() without hard coding the instrument in the parameters.
Collapse
X
-
Hi kal1212, thanks for writing in. The help guide suggest hard coding the instrument value in case the strategy needs to be used in the Strategy Analyzer, but you can take a look at the built in "Correlation" indicator for an example of how to take an input parameter for the Instrument name.
Kind regards,
-ChrisL
-
Hi kal1212, the Correlation indicator has code within the file that shows you how to use an Input value in AddDataSeries(). You can access the source code of Correlation through the NinjaScript Editor>Indicators folder.
In Correlation they have a property CorrelationSeries:
Code:[NinjaScriptProperty] [Display(ResourceType = typeof(Custom.Resource), Name = "NinjaScriptMarketAnalyzerColumnNameInstrument", GroupName = "NinjaScriptParameters", Order = 0)] [PropertyEditor("NinjaTrader.Gui.Tools.UppercaseTextEditor")] public string CorrelationSeries { get; set; } //Use this value in AddDataSeries: else if (State == State.Configure && !string.IsNullOrWhiteSpace(CorrelationSeries)) AddDataSeries(CorrelationSeries); Or, in the case of AddHeikenAshi, use it in the instrumentName parameter: AddHeikenAshi(CorrelationSeries, Data.BarsPeriodType baseBarsPeriodType, int baseBarsPeriodTypeValue, Data.MarketDataType marketDataType)
Kind regards,
-ChrisLLast edited by NinjaTrader_ChrisL; 10-12-2022, 12:47 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
80 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
40 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
63 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
54 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment