Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How can I access TickSize (or equivalent) from strategy Parameter section?
Collapse
X
-
koganam, you read my mind. I currently have an int param for tick_count and a string param for tick_dollars. The tick_dollars param uses tick_count and Instrument.MasterInstrument.PointValue * Instrument.MasterInstrument.TickSize to create visual dollars. No edit of dollars accepted. So, I do not serialize the tick_dollars param ([XmlIgnore]).
This works fine. tick_count is remembered. But, tick_dollars is not updated until the strategy dialog is forced to recalc such as scroll or reopen.
How can I force a single param or the whole strategy dialog to recalc?
Comment
-
Apply the [RefreshProperties(RefreshProperties.All)] attribute to the property.Originally posted by bernie_c View Postkoganam, you read my mind. I currently have an int param for tick_count and a string param for tick_dollars. The tick_dollars param uses tick_count and Instrument.MasterInstrument.PointValue * Instrument.MasterInstrument.TickSize to create visual dollars. No edit of dollars accepted. So, I do not serialize the tick_dollars param ([XmlIgnore]).
This works fine. tick_count is remembered. But, tick_dollars is not updated until the strategy dialog is forced to recalc such as scroll or reopen.
How can I force a single param or the whole strategy dialog to recalc?
Comment
-
koganam, Your suggestion of a hidden property to hold ticks_int is much more elegant than my solution. In attempting your solution I ran into a problem.
The user sees this: "10 ticks = $100.00"
To enter a new ticks value, the user selects the whole thing and enters a new tick value. Once entered (tab or return), ticks and dollars are shown as above. All works fine. When stopping and starting strategy the ticks value is remembered just fine.
However, when the strategy is removed and reloaded the last saved (Set Default for <>) ticks value gets replaced by the hardcoded default.
Not sure how to get around this.
The attached script illustrated the problem.Attached Files
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
637 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
366 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
571 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment