//+------------------------------------------------------------------+ //| heikenMA.mq4 | //| Sam | //| xx | //+------------------------------------------------------------------+ #property copyright "Sam" #property link "xx" #property version "1.00" #property strict //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ input int basisLen =14; input int slPoints =200; input int slOffset =400; input double lots_trade =0.15; input int Timeframe =15; int OnInit() { //--- //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ int start() { //--- //int limit=Bars-1-IndicatorCounted(); double heikin_open[]; double heikin_close[]; int j; for (j=0;j<=basisLen+2;j++); { heikin_open[j]=(Open[j+1]+Close[j+1])/2; heikin_close[j]=(Open[j]+Close[j]+High[j]+Low[j])/4; } //---- Comment("Open: " + heikin_open[0]); return(0); } void OnTick() { } //+------------------------------------------------------------------+