Profile Picture

ConstructorArgumentType.XXXX

Posted By DoQ 10 Years Ago
Message
DoQ
Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)
Posted Thursday September 13 2007
I'm trying to pass a ulong (volume, avg volume) to one of my indicators. Until now, I have been using

ConstructorArgumentType.Integer

 

Essentially, I need, for higher volume stocks, i.e. QQQQ

ConstructorArgumentType.UnsignedLong

 

How can I accomplish this as it does not exist. And what is

ConstructorArgumentType.UserDefined

 

thx




DoQ_Indicators
"better is the enemy of good enough"
Posted Thursday September 13 2007
I'll need to research the UserDefined , but I would imagine it would let you specify any type you wanted (try setting the constructor parameter to ulong).  Only problem I foresee is using the indicator from the UI might not work correctly if we can't figure out how to query the end user for the value.

And if that doesn't work using double for the time being might get youu through the day.

DoQ
Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)Supreme Being (11,489 reputation)
Posted Thursday September 13 2007
young (9/13/2007)
I'll need to research the UserDefined , but I would imagine it would let you specify any type you wanted (try setting the constructor parameter to ulong).  Only problem I foresee is using the indicator from the UI might not work correctly if we can't figure out how to query the end user for the value.

And if that doesn't work using double for the time being might get youu through the day.

 

Tried the constructor parameter option and casting within the ConstructorArgument but with no luck. Seems it returns 0 or undefined for anything declared as UserDefined . The Value field in the UI correctly displays the default value.

Double might be the current option.

 

thx.


DoQ_Indicators
"better is the enemy of good enough"
Posted Friday September 14 2007
I have added support for Int64 constructor arguments.  For now, I would recommend using a double.

Specifying the type of the argument in the attribute is redundant, since we can just get that information via reflection.  So as of the next release, we won't even be looking at what the attribute says the type is.  The only thing we will use the attribute for is to get the name and default value of the argument.

The supported argument types are string, Int32, Int64, double, BarElement, and Boolean.  The ChartPane and UserDefined ConstructorArgumentTypes are not really supported.

You can also define your own enumeration, and use it for a constructor argument.  This is quite useful when you have multiple options.  The comparison trigger currently uses this functionality to let you choose the comparison type.  Note that enum constructor arguments were not really supported in the current release (build 322), but they will be in the next release.

Thanks,
Daniel



Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems