Open Ecry Question

Discussion in 'Retail Brokers' started by arbitragetrader, Jun 1, 2011.

  1. Hello,
    I was wondering if someone could help me with a heikin ashi bar for Openecry. I have looked all over this forum and other forums and haven't found the exact answer. I had tradestation and switched to Openecry and was able to make a HA through an easylanguage transfer from TS but it does not look exact. I know there will be differences but could someone take a look at the code and suggest any improvements or a new code completely.
    Thanks,
    Arbitrage


    inputs: UpColor(green),DnColor(red);

    vars: haClose(0),haOpen(0),haHigh(0),haLow(0),
    color(0);

    if BarNumber = 1 then
    begin
    haOpen = open;
    haClose = (O+H+L+C)/4;
    haHigh = MaxList( high, haOpen, haClose);
    haLow = MinList( low, haOpen,haClose);
    end;

    if BarNumber > 1 then
    begin
    haClose = (O+H+L+C)/4;
    haOpen = (haOpen [1] + haClose [1])/2 ;
    haHigh = MaxList(High, haOpen, haClose) ;
    haLow = MinList(Low, haOpen, haClose) ;

    if haClose > haOpen then
    color = UpColor
    else
    color = DnColor;

    plotPB(haOpen,haClose,"heikin-ashi",color);
    SetPlotWidth(1,1);
    SetPlotColor(1,color);
    end;