You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 programming forum 2017.05.23
iAlligator signal gone wrong - MQL4 programming forum #4.2 2017.06.15
take candle color hekin ashi - MQL4 and MetaTrader 4 #8-9 or #1 2018.02.21
You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 programming forum 2017.05.23
iAlligator signal gone wrong - MQL4 programming forum #4.2 2017.06.15
take candle color hekin ashi - MQL4 and MetaTrader 4 #8-9 or #1 2018.02.21
What does this mean??
The original Heiken Ashi mixes high and low values depending on open and close, so the values should be checked.
//--- enum ENUM_BUFFER { BUFFER_HIGH=0, BUFFER_LOW, BUFFER_OPEN, BUFFER_CLOSE }; //--- double iHeikenAshi(const string symbol,ENUM_TIMEFRAMES timeframe,ENUM_BUFFER buffer,int shift) { if(buffer==BUFFER_HIGH) return(MathMax(iCustom(symbol,timeframe,"Heiken Ashi",0,shift),iCustom(symbol,timeframe,"Heiken Ashi",1,shift))); if(buffer==BUFFER_LOW) return(MathMin(iCustom(symbol,timeframe,"Heiken Ashi",0,shift),iCustom(symbol,timeframe,"Heiken Ashi",1,shift))); return(iCustom(symbol,timeframe,"Heiken Ashi",buffer,shift)); }
The attached, modified one is straightforward.
//--- enum ENUM_BUFFER { BUFFER_HIGH=0, BUFFER_LOW, BUFFER_OPEN, BUFFER_CLOSE }; //--- double iHeikenAshiB(const string symbol,ENUM_TIMEFRAMES timeframe,ENUM_BUFFER buffer,int shift) { return(iCustom(symbol,timeframe,"HeikenAshi",buffer,shift)); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- Print("High: ",iHeikenAshi(_Symbol,PERIOD_CURRENT,BUFFER_HIGH,2)); Print("Low: ",iHeikenAshi(_Symbol,PERIOD_CURRENT,BUFFER_LOW,2)); Print("High: ",iHeikenAshiB(_Symbol,PERIOD_CURRENT,BUFFER_HIGH,2)); Print("Low: ",iHeikenAshiB(_Symbol,PERIOD_CURRENT,BUFFER_LOW,2)); } //+------------------------------------------------------------------+
The original Heiken Ashi mixes high and low values depending on open and close, so the values should be checked.
The attached, modified one is straightforward.
Thanks. I get what i was trying to figure or know.
that was really helpfull.
and do i have the permission to use your code,which you have provided?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hello everyone.
Can anyone help me in getting the High\Low values of Heikin Ashi, I know that these can be Mapped by using iCustom() function.
I do not want to get into the details about what will do what. I just want a simple line of code which will give me these values.
if you can help then please comment.
I have been getting alot of help from this community, So thanks in advance.