Thanks for posting your trading system.  I have generalized and
refactored it a bit to allow you to specify any periods instead of 10
and 12.  I tried it in daytrading on 1 minute bars, and found that 13
and 16 worked better, but still no profit for me.

Also included is a handy utility ("Let") to switch variable settings
between assignment, Param, and Optimize modes.

// Positivity of Volume, by Gerard Carey
// Generalized by Daniel LaLiberte

function PositivityOfVolume (prd1, prd2)
{
      aWMA = WMA(Close, prd1);
      vWMA = WMA(Volume, prd1);
      cond = Iif(aWMA > Ref(aWMA, -1), vWMA, -vWMA);

      CA = cond - Ref(MA(cond, prd2), -1);
      return CA;
}

function Let(label, default, start, end, inc, mode)
// Arguments are the same as Param and Optimize,
// with additional mode argument to specify either
// assignment ("i"), Param ("p"), or Optimize ("o")
{
      if (mode == "i") result = default;
      else if (mode == "p") result =
            Param(label, default, start, end, inc);
      else if (mode == "o") result =
            Optimize(label, default, start, end, inc);

      return result;
}
prd1 = Let("prd1", 10, 9, 15, 1, "o");
prd2 = Let("prd2", 12, 15, 26, 1, "i");

PoV = PositivityOfVolume(prd1, prd2);

Plot(PoV, "Positivity of Volume", colorBlack, styleThick);
Plot(0, "", colorRed);








Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS




Reply via email to