Register Login
Forums    February 9, 2012
TradersStudio Forums
Using a string as an input to a custom indicator
Last Post 09-05-2007 08:01 PM by mur ang. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Tom Himel
New Member
New Member
Posts:14

--
09-05-2007 03:44 PM

    I've written a simple test custom indicator that takes a string as input.  Here is the code:

    Sub fracFindPlot3(FDLpath as string, input0 as double)

        Dim inputs As array

        Dim outputs As array

        ReDim(outputs,40)

        redim(inputs,2)

        outputs[0] = 10.0

        inputs[0]=input0

        inputs[1]=1.0

        fracFindFunc3(FDLpath, inputs, Outputs)

        plot1(outputs[0])

    End Sub

     

    When I run it, I get the expected dialog box that allows me to enter the inputs and set the plot color and panel.  For the input FDLpath, I enter "junk" (where I typed all 6 characters including the quotes into the box).

    When I click on "OK" I get the following error message box.

     

    "FDLpath ("junk") is not a valid floating value. """ in not a valid numberic character.  If you want to pass string, please use "" around it."

     

    So it is clearly seeing my quotes, yet it isn't accepting it as a string.

     

    I tried entering a string to one of the example script files and it worked perfectly. 

     

    Why can't I pass a string to the indicator?  (Murray, I emailed you a screen capture a few days ago to help make the symtom perfectly clear.)

     

    thanks

     

    mur ang
    Advanced Member
    Advanced Member
    Posts:525

    --
    09-05-2007 08:01 PM
    I don't think Custom indicators accept strings. Only integers and floats.
    You are not authorized to post a reply.


     TradersStudio, Inc. ® Copyright 2004-2012 All Rights Reserved   Terms Of Use  Privacy Statement