- Coding help
- Add a Moving Average to MACD
- Add a Moving Average to MACD code
Totally unreadable mess, to insert code use Alt+S
Thanks , I believe its better now
Bigyusufff:
Thanks , I believe its better now
Thanks , I believe its better now
yes but you have not said what your problem is... what is it not doing/doing that is wrong
the goal is for the indicator to alert the user when zero line cross either upward or downward. but its not even doing anything,
Bigyusufff:
It is not a zero cross indicator but i have been trying to tweak it but got stuck, please i just need another person to review and probably assist me. Thank you for your time
It is not a zero cross indicator but i have been trying to tweak it but got stuck, please i just need another person to review and probably assist me. Thank you for your time
The first thing that you need to do is make sure that the code compiles. The code that you have posted doesn't. You have plenty of undeclared identifiers and there is no DrawArrow() function.
Then you should fix other anomolies
input int r = 2; // First ema period Use descriptive names, especially if you want others to check your code input int s = 10; // Second ema period ie. EMAperiod1,EMAperiod2,EMAperiod3 input int u = 5; // Third ema period
IndicatorBuffers(4); SetIndexBuffer(0,tsi,INDICATOR_DATA); SetIndexStyle(0, DRAW_LINE); SetIndexBuffer(1,sig,INDICATOR_DATA); SetIndexStyle(1, DRAW_LINE); SetIndexBuffer(2,trend,INDICATOR_CALCULATIONS); SetIndexBuffer(3,count,INDICATOR_CALCULATIONS); SetIndexStyle(6, DRAW_LINE, STYLE_SOLID,LineSize3); SetIndexBuffer(6, ZeroLine);
count[0] = limit; //What is this buffer used for. This is the only place that it is assigned a value
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