if i understand you right, you have an indicator that give yous signals.
The Indicator have buffer Values. You have to imliment the handle of the indicator with iCustom, iMACD in the OnInit,
dort forget to SetArrayAsSeries
and then you can do the CopyBuffer Function in OnTick.
now you can read the Buffer Values in your OnTick function
identified issue, it is not related to indicator buffer as this EA generated by MT5 wizard so all those has been taken care of in back end
in the end was pattern valune in Singal code incorrectly entered caused issue
Still thanks a lot to reply me here, much appreciated!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi there,
I am new to MT5 and learning write some simple expert advisor by silghtly modify stock signals.
below is my test EA source code. what i am expecting is when MACD main line above zero level && STOCH main line > STOCH signal line. it should generate a buy signal.
MACD singal pattern value is 30, STOCH signal pattern value is 90. both weight at 1.0 (from what i am understanding, combined signal strength should be 60 if both signals are giving idenfical direction, for example buy)
However, whenever i change Signal_ThresholdOpen to any value >15. it simply does not open any trade. looks like it only calculates MACD singal value and ignors all STOCH input
Can anyone point out where i were doing wrong?
*MACD and STOCH singal are working as expected if i generate EA with 1 singal only
Below is EA source code