Help with Ameritrade's StrategyDesk version of HiekinAshi formula

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;

**********************************************
 
Back
Top