
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
I was trying to build an EA by using Envelop indicator and EMA indicator. But when I run the code it some orders were placed with wrong conditions.
My Strategy is shown in the figure.
I assumed Period 1 of EMA is equal to line chart.
SELL ORDER
- When downward line chart cross with lower envelop place sell order. No SL and TP.
-This sell order is profitable or not I want to close the order when line chart cross again with the lower envelop.
BUY ORDER
- When upward line chart cross with upper envelop place buy order. No SL and TP.
-This buy order is profitable or not I want to close the order when line chart cross again with the upper envelop.
I add trailing stop as well.
Envelop settings
EMA settings
My code posted below. But it have some issues. I want to fix those issues. Please anyone can help me.
I'm not a good coder.
Thank you.