Multiplication Operator Error Message
Author: jtgraham
Creation Date: 2/21/2009 4:44 PM
profile picture


For line 44 in the following code I received the error message: Operator * cannot be applied to operands of type 'double' and 'WealthLab.Strategy Parameter' Can you help me correct this error in applying a multiplication factor to high[bar]? (It worked when I used a number such as 1.02 instead of a parameter.)

Other than the parameter error, does the exit code look ok? My objective is to exit the position if a limit price is reached, or a time-based exit is triggered, or if a trailing stop is triggered, whichever occurs first.

How can I have the Exit Name "Time Based" print in the Strategy Window when the time-based exit occurs?

Please log in to see this code.
profile picture


Use a Strategy Parameter's Value (floating point) or ValueInt (integer) property, i.e., limit.Value

Follow the design pattern any installed script that uses Strategy Parameters, like the Glitch Index, Dip Buyer, etc.