Did you try that?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Creating a Strategy Using Decimal inputs
Collapse
X
-
Hello pborg05,
Thanks for your post.
Integer variables do not have a decimal portion. Input variables would need to be doubles in order to have a decimal value.
The BollingerBand indicator uses the Period integer input to create the StdDev and SMA indicators that it is based on. This describes the number of bars used, which cannot be a non integer value.
You could consider copying this indicator, adding a double User Defined Input and using that input as a multiplier in the Upper and Lower plot calculations to achieve your goal.
For example:
Code:Upper[0] = sma0 + NumStdDev * stdDev0 * MyDouble; Middle[0] = sma0; Lower[0] = sma0 - NumStdDev * stdDev0 * MyDouble;
You could also consider modifying the NumStdDev variable so it is a double instead of an integer.
Creating User Defined Inputs - https://ninjatrader.com/support/help...d_input_pa.htm
We look forward to assisting.Last edited by NinjaTrader_Jim; 09-13-2020, 09:30 PM.
Leave a comment:
-
Creating a Strategy Using Decimal inputs
Hi Team
I have created a strategy where the user inputs the value of the Bollinger Band deviation but where the value is an integer it is not possible to input a decimal. Without decimals the strategy is no where near specific enough as changes in whole numbers makes a huge difference to the strategy. Is it possible to set the input so decimal numbers can be inputted.
Many Thanks
Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johnMoss, 03-04-2024, 01:53 PM
|
3 responses
46 views
0 likes
|
Last Post
by AndyM
Today, 06:13 PM
|
||
Started by algospoke, Today, 06:01 PM
|
0 responses
8 views
0 likes
|
Last Post
by algospoke
Today, 06:01 PM
|
||
Started by cre8able, Today, 05:53 PM
|
0 responses
8 views
0 likes
|
Last Post
by cre8able
Today, 05:53 PM
|
||
Started by Wessel, 03-23-2024, 02:37 PM
|
3 responses
24 views
0 likes
|
Last Post Today, 04:58 PM | ||
Started by martini, Yesterday, 04:45 PM
|
4 responses
32 views
0 likes
|
Last Post
by martini
Today, 04:48 PM
|
Leave a comment: