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 NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
139 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment