Help with Ameritrade's StrategyDesk version of HiekinAshi formula

Discussion in 'Automated Trading' started by anukoti, Nov 15, 2011.

  1. anukoti

    anukoti

    Hello,

    I am trying to develop a formula to scan and backtest a strategy using HeikinAshi Difference in StrategyDesk from Ameritrade.

    I know other programming languages like thinkscript or C++ but I am having hard time coming up


    Can someone please share or help me come up with the formula for the scan?

    Thanks in Advance.

    Here is the thinkscript version of the formula.

    **********************************************
    def HAshiClose = (high + low + open + close) / 4;
    rec HAshiOpen = CompoundValue(1, (haopen[1] + haclose[1]) / 2, (open[1] + close[1]) / 2);
    def HAshiDifference = HAshiClose - HAshiOpen;

    **********************************************