Ok, how can I do that? I'm very beginner.
On long trade, when ema5 cross down ema10 => close order
On short trade when ema5 cross up ema10 => close order
Can you help me?
Thank's
EMA_1 = iMA(Symbol(),0,EMA_Period1,0,MODE_EMA,PRICE_CLOSE,0);
EMA_2 = iMA(Symbol(),0,EMA_Period2,0,MODE_EMA,PRICE_CLOSE,0);
EMA_1_2 = iMA(Symbol(),0,EMA_Period1,0,MODE_EMA,PRICE_CLOSE,1);
EMA_2_2 = iMA(Symbol(),0,EMA_Period2,0,MODE_EMA,PRICE_CLOSE,1);
if (EMA_1>EMA_2&&EMA_1_2<EMA_2_2) Cross Upward .. vice versa for Downward
Thank's EADeveloper. I've dreamed to this code during the night and I've seen the same code of you. Thank's to comfirm my dream.
Whit your pseudo, I think you are an EA developer. Just for fun, how much to create an EA like this? Because some poeple offers to
create this code for me, but I think the price is to expensive.
Good day!
pgforex
I have a question!
EMA_1 = iMA(Symbol(),0,EMA_Period1,0,MODE_EMA,PRICE_CLOSE,0);
EMA_2 = iMA(Symbol(),0,EMA_Period2,0,MODE_EMA,PRICE_CLOSE,0);
EMA_1_2 = iMA(Symbol(),0,EMA_Period1,0,MODE_EMA,PRICE_CLOSE,1);
EMA_2_2 = iMA(Symbol(),0,EMA_Period2,0,MODE_EMA,PRICE_CLOSE,1);
if (EMA_1>EMA_2&&EMA_1_2<EMA_2_2) Cross Upward .. vice versa for Downward
EMA_1 & EMA_2 is for the current bar
EMA_1_2 & EMA_2_2 is for the previous bar
What happen if EMA_1_2 & EMA_2_2 are equal during the previous 2,3 or more bars.
If I use (EMA_1>EMA_2&&EMA_1_2<EMA_2_2), the condition never meet.
Is in't better like that? (EMA_1>=EMA_2&&EMA_1_2<EMA_2_2)
Thank's
pgforex
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello, I want to close order when ema5 cross ema10.
I don't know why but don't work.
In function SecondTakeProfit(), I use iMA to close order.
Thank's
pgforex