jcl
Do you think you will be add a HULL code to the 1.04 version of Zorro? I have gotten the work down to this:
// HMA PriceSeries( NumericSeries ), Period( NumericSimple );
var HMA(var* Data,int Period)
{
var * WMA = series(*Data, Period);
var halvedLength;
var sqrRootLength;
var * Value1;
var * Value2;
var * Value3;
if ((ceiling(Period / 2) - (Period / 2)) <= 0.5) then
halvedLength = ceiling(Period / 2)
else
halvedLength = floor(Period / 2);
if ((ceiling(sqrt(Period)) - sqrt(Period)) <= 0.5) then
sqrRootLength = ceiling(sqrt(Period))
else
sqrRootLength = floor(sqrt(Period));
Value1 = 2 * series(WMA(*Data, halvedLength));
Value2 = series(WMA(*Data, Period));
Value3 = series(WMA((Value1 - Value2), sqrRootLength));
return Value3;
}
and I also tried this for an actual strategy but neither worked:
function run()
{
var *ClosePrice = series(priceClose());
var *WMA8 = series(WMA(ClosePrice,8));
var *WMA16 = series(WMA(ClosePrice,16));
var *WMA18 = series(WMA(ClosePrice,18));
var *WMA36 = series(WMA(ClosePrice,36));
var *HMA16= series(WMA(WMA(WMA8() - WMA16()),4));
var *HMA36 = series(WMA(WMA(ClosePrice,18) - WMA(ClosePrice,36),6));
if(crossUnder(HMA16,HMA36))
enterShort();
if(crossOver(HMA16,HMA36))
enterLong();
}
Im sorry im a total beginner, my friend who coded left so I have been trying to teach myself. This is the only thing I am trying to figure out all else I did through trial and error. I would really appreciate your input.
-Boris