TMF - Chandelier

Posted By: danatrader

TMF - Chandelier - 06/05/20 05:03

https://www.zorro-trader.com/manual/en/trade.htm


the following gives an syntax error, cause "Multiplier" is a "Variables for futures and options"
https://www.zorro-trader.com/manual/en/contracts.htm


// TMF with parameters, for a Chandelier Stop
int Chandelier(var TimePeriod,var Multiplier)
{
if(TradeIsLong)
TradeStopLimit = max(TradeStopLimit,ChandelierLong(TimePeriod,Multiplier));
else
TradeStopLimit = min(TradeStopLimit,ChandelierShort(TimePeriod,Multiplier));
return 8; // only update once per bar
}

function run()
{
...
if(LongSignal) {
Stop = ChandelierLong(22,3);
enterLong(Chandelier,22,3);
}
...
}
Posted By: jcl

Re: TMF - Chandelier - 06/10/20 07:39

Thanks, we'll change the name.
© 2024 lite-C Forums