How to enter multiple date range


Tags:
Category:
0
0

Quick question: How do i show a range of breakout bars. Meaning – I want to see 1 – 5 breakout bars?

\\\”input breakOutBars = 3; (I would like it to read \\\”input Breakoutbars = 1 – 5;) if that makes senses.

Marked as spam
Posted by (Questions: 1, Answers: 2)
Asked on January 23, 2017 12:00 pm
77 views
0

Before trying to answer this I will use the comment field to ask you to provide more details. I understand you are working with an Input parameter of a study. Instead of having the input show a single value of ”3”. You would like it to show a range ”1-5”? Or would you like it to show each of the five values listed in series ”1, 2, 3, 4, 5”? The other item that needs clarification is exactly how you plan to use the input value within your code. You will be changing it from a number to a text string and this will need to be handled within the rest of your code. Feel free to edit your original question or provide these details in a comment below this one.

( at January 23, 2017 12:59 pm)
0
Private answer

Maybe I am doing something that’s not needed. I’ve attached a screen shot with my proposed changes in red. If the scan searches for everything below a single digit automatically, I’m good. 

Your site is Awesome!!!  Jon

 

Attachments:
Marked as spam
Posted by (Questions: 1, Answers: 2)
Answered on January 23, 2017 4:35 pm
0
Private answer

Maybe I am doing something that’s not needed. I’ve attached a screen shot with my proposed changes in red. If the scan searches for everything below a single digit automatically, I’m good. 

Your site is Awesome!!!  Jon

 

Attachments:
Marked as spam
Posted by (Questions: 1, Answers: 2)
Answered on January 23, 2017 4:35 pm
0

Perfect! I have what I need. Again – this site is awesome!

Thanks

( at January 24, 2017 1:44 pm)
0
Private answer

Correct, you really don’t need to do that. It would be a major headache for a novice to get working. Nevertheless, in the interest of raising the bar…

input breakOutBars = {"1", "2", default "3", "4", "5"};

Ok, that is how you would create the input so that you had a selection of 1, 2, 3, 4 or 5. The problem is this converts the values to strings. And they cannot be used directly within the code until they have been converted back to numbers.

So:

def breakOutBarsNumerical;
switch (breakOutBars) {
case "1":
breakOutBarsNumerical = 1;
case "2":
breakOutBarsNumerical = 2;
case "3":
breakOutBarsNumerical = 3;
case "4":
breakOutBarsNumerical = 4;
case "5":
breakOutBarsNumerical = 5;
}

And after having done this conversion, you would need to replace every occurrence of “breakOutBars” in the lines that follow with the new variable “breakOutBarsNumerical”.

If all you really want is to have the code scan for breakOutBars that equal any value from 1 through 5. Then simply set this parameter to 1. It’s simply a limit, and whatever value is selected for this input is the lowest acceptable value. Anything from 1-infinity will be included.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on January 23, 2017 7:30 pm