The scenario is to select days of week for trading.
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
Multi-select enum
Collapse
X
-
Multi-select enum
Anyone has sample code for Multi-select enum? Simply adding [flag] before the enum definition doesn't work (Strategy only shows dropdown for single value selection). I know it's possible to create a type converter to do it, but what to know if there an existing way to do it.
The scenario is to select days of week for trading.Tags: None
-
Chelsea, thanks for the reply. It looks the enum editor in the strategy analyzer is exactly what I want. I am wondering if it's accessible from custom strategy.
Comment
-
NinjaTrader_ChrisL, here is the screen shot from the Strategy Analyzer, Optimization Settings:
This exactly the multi-select enum UI I was referring to. It can greatly simply coding: 1 single enum can replace 9 bool's. I guess there is a PropertyEditor or TypeConverter in the Strategy Analyzer, and it will be great you can look into it and see if it's OK to use it for custom strategy development.
Comment
-
Hi, thanks for pointing that out. This is a custom control in the strategy analyzer that has special code-behind that makes it work. Enums only have one selected value at one time, so you will need to use the first example linked by Chealsea to make something similar with boolean variables.Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Rapine Heihei, Today, 08:19 PM
|
1 response
4 views
0 likes
|
Last Post Today, 08:30 PM | ||
Started by Rapine Heihei, Today, 08:25 PM
|
0 responses
5 views
0 likes
|
Last Post Today, 08:25 PM | ||
Started by f.saeidi, Today, 08:01 PM
|
1 response
4 views
0 likes
|
Last Post Today, 08:17 PM | ||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, Today, 07:51 PM
|
0 responses
6 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by frslvr, 04-11-2024, 07:26 AM
|
5 responses
97 views
1 like
|
Last Post
by caryc123
Today, 07:47 PM
|
Comment