Here is some sample code:
#region Variables
// User defined variables (add any user defined variables below)
private int tickAltPeriod;
protected override void Initialize()
{
Add(PeriodType.Tick, tickAltPeriod);
For example, let's say the variable tickAltPeriodPro takes a value of 0.20. Using a tick chart with a period of 266, I would like tickAltPeriod to be equal to 53 (Floor function return value of the expression [266 * 0.20]).
If I make tickAltPeriod an int variable then I get an error when the Floor function returns a double. If I make tickAltPeriod a double then the Add function returns an error (it's expecting a int input).
Hopefully there's a simple workaround that I'm overlooking. Thank you.
Regards,
Comment