Announcement

Collapse
No announcement yet.

Edit Studies question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Edit Studies question

    I'm trying something new and it does not appear to be working properly.

    I've defined a series of inputs as STRINGS and these strings are actually a CSV number series - like "234,434,555,232"

    When first loaded on the chart (no change to the input values), it works just fine. As soon as I click on Edit Studies, change anything and click OK, it stops working all together. It never generates any debug info like on startup of the efs - nothing.

    Don't know if it's something I'm doing wrong or if it's something internal (using numbers as strings).

    Anyone ever try this?
    Brad Matheny
    eSignal Solution Provider since 2000

  • #2
    BTW, I figured out that Edit Studies interprets a STRING as a NUMBER if the string IS a number.

    For example, if I designate an input as

    PHP Code:
        aFPArray[x] = new FunctionParameter"TriggerID"FunctionParameter.STRING);    
        
    withaFPArray[x] ) {
          
    setDefault("1234,5678"); //Edit this value to set a new default
        

    When I load the efs, this value is interpreted as a STRING ("1234,5678")

    When I go into EDIT STUDIES and change ANY SETTING, then click OK, this STRING now becomes a NUMBER.

    "1234,5678" turns into 12345678.0

    So, the only solution I can come up with is to add a TEXT DESIGNATOR to the beginning of the values to FORCE it to be a string. Like "A,1234,5678".

    I'll strip out the "A" of course (in the workings of the code) because it is only needed to trick EDIT STUDIES into thinking this is still a STRING

    Anyway, for anyone interested, this is a great way to handle "multiple array inputs" within EDIT STUDIES. The only problem is you need to trick it with an ALPHA DESIGNATOR at the beginning of the input series.
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment

    Working...
    X