creskita:
Did you check the timeframe? You use PERIODE_H1 in your MA and perhaps your chart is other than H1 chart.
Please help,
I'm trying to code an indicator which will involve a MA.
The coding I have come up with for the MA itself is the following:

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
Please help,
I'm trying to code an indicator which will involve a MA.
The coding I have come up with for the MA itself is the following:
I then want it set a bearish indication on the screen if the price on close is less than the MA value.
I have come up with this:
I can't figure out why, but it's not working. For one, instead of setting a bearish indicator, it's giving me bullish indicators. There are also many indicators in places where the close price is greater than the MA value and I can't figure it out either.
Can anyone help?
Thanks.