Tuesday, January 06, 2009     | Register
TradersStudio Forums
Subject: Using a string as an input to a custom indicator

You are not authorized to post a reply.   
Author Messages
thimel1
Posts:14

09-05-2007 3:44 PM Alert 

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Ύ] = 10.0

    inputsΎ]=input0

    inputsΏ]=1.0

    fracFindFunc3(FDLpath, inputs, Outputs)

    plot1(outputsΎ])

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

 

murray
Posts:435

09-05-2007 8:01 PM Alert 
I don't think Custom indicators accept strings. Only integers and floats.
You are not authorized to post a reply.
Forums > TradersStudio 2.x > TradersStudio Basic > Using a string as an input to a custom indicator



ActiveForums 3.6
TradersStudio® Copyright 2004-2009 All Rights Reserved   |  Privacy Statement  |  Terms Of Use