trying to make something out of the Indicator ( Heiken_Ashi.mq5 )
- I got it so far, musical (when the gray line above the blue one sound, when below, another sound)
I can not, do not get it right, how to make the line that crosses the other line, the signal went off and shut up ?
I did that, but the alarm goes off every bar
//--- we work only at the time of the birth of new bardatetime time_0=iTime(Symbol(),Period(),0);
if(time_0==m_prev_bars)
return(rates_total);
m_prev_bars=time_0;
//---int find_buy_level=ObjectFind(0,InpFont2);
int find_sell_level=ObjectFind(0,InpFont1);
if(find_buy_level==0)
{
double price=ObjectGetDouble(0,InpFont2,OBJPROP_PRICE);
if(ObjectGetDouble(0,InpFont1,OBJPROP_PRICE)<price)
{
PlaySound("tick.wav");
//---return(rates_total);
}
}
if(find_sell_level==0)
{
double price=ObjectGetDouble(0,InpFont2,OBJPROP_PRICE);
if(ObjectGetDouble(0,InpFont1,OBJPROP_PRICE)>price)
{
PlaySound("stops.wav");
//---return(rates_total);
}
}
//--- donereturn(rates_total);
}
The signal from the Heiken_Ashi indicator. ---- Heiken2_Ashi Indicator
And, an Expert Advisor for testing the Indicator
In the Heiken2_Ashi Indicator, you can add filters
//---- получение хендла индикатора RSI
RSI_Handle=iRSI(NULL,0,int(ParmMult*9),PRICE_CLOSE);
if(RSI_Handle==INVALID_HANDLE)
Print(" Не удалось получить хендл индикатора iRSI");
//---- получение хендла индикатора Stochastic
STO_Handle=iStochastic(NULL,0,int(21*ParmMult),int(3*ParmMult),int(2*ParmMult),MODE_LWMA,STO_LOWHIGH);
if(STO_Handle==INVALID_HANDLE)
Print(" Не удалось получить хендл индикатора iStochastic");
//---- получение хендла индикатора MACD
MACD_Handle=iMACD(NULL,0,int(10*ParmMult),int(15*ParmMult),int(13*ParmMult),PRICE_CLOSE);
if(MACD_Handle==INVALID_HANDLE)
Print(" Не удалось получить хендл индикатора iMACD");
//---- получение хендла индикатора hHeiken_Ashi
hHeiken_Ashi=iCustom(NULL,0,"Examples\\Heiken_Ashi");
if(hHeiken_Ashi==INVALID_HANDLE)
Print(" Не удалось получить хендл индикатора hHeiken_Ashi");
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
A simple Expert Advisor for testing Indicators
enter the name of the indicator
if the position opens in the wrong direction, switch the reverse
not all indicators work - ok, signal indicators work
all expert settings
A simple Expert Advisor for testing Indicators
enter the name of the indicator
if the position opens in the wrong direction, switch the reverse
not all indicators work - normal, signal indicators work
all expert settings
if the indicator is located in another folder
write it like this - Examples\\ZigzagColor
trying to make something out of the Indicator ( Heiken_Ashi.mq5 )
- so far I got, Musical ( when grey above blue, one sound, when below, another sound )
trying to make something out of the Indicator ( Heiken_Ashi.mq5 )
- I got it so far, musical (when the gray line above the blue one sound, when below, another sound)
I can not, do not get it right, how to make the line that crosses the other line, the signal went off and shut up ?
I did that, but the alarm goes off every bar
It is an interesting indicator. How does it work?
I don't know yet, I'm not a programmer - so, by poking, I want the line to cross another line and trigger a signal.
- It seems to work - but not like that.
The signal from the Heiken_Ashi indicator. ---- Heiken2_Ashi Indicator
And, Expert to test the Indicator
The signal from the Heiken_Ashi indicator. ---- Heiken2_Ashi Indicator
And, an Expert Advisor for testing the Indicator
In the Heiken2_Ashi Indicator, you can add filters
by adding these filters here
here
like this
The indicator, there is something about it, when it is best to open a position
Between the two horizontal lines, you can open in whichever colour the dot is .