Dear expert programmers! I am begging you to write an EA for crossing MAs, but strictly according to the algorithm. I have seen many similar Expert Advisors, but they all fail, which is logical because they were originally developed incorrectly. I want to use the algorithm that I got very good results with the help of "hands" in the Strategy Tester. I want to ask you to write it down for me.
-Expert Advisor should only control its own positions, not touching positions opened manually and/or with the help of other Expert Advisors.
-The Expert Advisor must not open a position until the previously opened position is closed.
- The Expert Advisor should be able to work simultaneously on several currency pairs
Instruments: EMA 14
EMA 5
Entry:
Entry is made when both MAs are crossed.
Buy
- When EMA 5 crosses EMA 14 from below, you may enter on the candle following the cross, if it exceeds the high by 1 pip.
Sell
- When EMA5 crossed EMA 14 from above downwards, entry to sell will be made on the candle following the crossing candle, when it dropped below its low by 1 pips.
Exit:
Exit is taken when the opposite signal occurs or when take profit or stop loss is reached
Stop Loss and Take Profit:
Initial stop loss is set at a distance of 30 pips from the entry point .
Initial Take Profit shall be set at 50 pips from the entry point.
When opening positions and setting stop-loss and take-profit, the Expert Advisor shall take into account the spread.
External parameters:
- MA - period 14 Exponential method , shift - 0, apply to close
- MA - period 5 Exponential method, shift - 0, apply to close
- Ability to change Take Profit, Stop Loss, and EMA parameters including its method.
Thank you so damn much in advance!
Will you paint the fence? :)
>> And there's nothing there yet)
Tell me please, on which timeframe does it work for you?
Taking money to write such an expert is "Grizzly as it eats"... I wouldn't have the nerve =)
If you have the patience - tomorrow, when I get back from uni, I'll post it here
//+------------------------------------------------------------------+ //| E_A_MA.mq4 | //| TO | //| http://ridecrufter.narod.ru/index.html | //+------------------------------------------------------------------+ #property copyright "TO" #property link "http://ridecrufter.narod.ru/index.html" extern int Ma_Fast_Period=5; extern int shift_fast=0; extern int method_fast=1; extern int applied_price_fast=0; extern int Ma_Slow_Period=14; extern int shift_slow=0; extern int method_slow=1; extern int applied_price_slow=0; extern int TP=50; extern int SL=30; extern double vol=0.1; extern int magic=387149; int i; bool buy, sell; int init() { return(0); } int deinit() { return(0); } int start() { if(iMA(NULL,0, Ma_Fast_Period, shift_fast, method_fast, applied_price_fast,1)> iMA(NULL,0, Ma_Slow_Period, shift_slow, method_slow, applied_price_slow,1) && iMA(NULL,0, Ma_Fast_Period, shift_fast, method_fast, applied_price_fast,2)<= iMA(NULL,0, Ma_Slow_Period, shift_slow, method_slow, applied_price_slow,2) && Bid>=(High[1]+1*Point)) { if(OrdersTotal()!=0) { for( i=0; i<OrdersTotal(); i++) { OrderSelect( i, SELECT_BY_POS, MODE_TRADES); if(OrderMagicNumber()== magic && OrderType()==1) { OrderClose(OrderTicket(),OrderLots(),Ask,3,Gold); } if(OrderMagicNumber()== magic && OrderType()==0) buy=true; } } if(! buy){OrderSend(Symbol(),OP_BUY, vol,Ask,3,Bid- SL*Point,Ask+ TP*Point,NULL, magic,0,Aqua); sell=false;} } if(iMA(NULL,0, Ma_Fast_Period, shift_fast, method_fast, applied_price_fast,1)< iMA(NULL,0, Ma_Slow_Period, shift_slow, method_slow, applied_price_slow,1) && iMA(NULL,0, Ma_Fast_Period, shift_fast, method_fast, applied_price_fast,2)>= iMA(NULL,0, Ma_Slow_Period, shift_slow, method_slow, applied_price_slow,2)&& Bid<=(Low[1]-1*Point)) { if(OrdersTotal()!=0) { for( i=0; i<OrdersTotal(); i++) { OrderSelect( i, SELECT_BY_POS, MODE_TRADES); if(OrderMagicNumber()== magic && OrderType()==0) { OrderClose(OrderTicket(),OrderLots(),Bid,3,Gold); } if(OrderMagicNumber()== magic && OrderType()==1) sell=true; } } if(! sell){OrderSend(Symbol(),OP_SELL, vol,Bid,3,Ask+ SL*Point,Bid- TP*Point,NULL, magic,0,Magenta); buy=false;} } return(0); }Feel free to use it, and if there is anything you need to tweak, you can do so here: .....

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear expert programmers! I am begging you to write an EA for crossing MAs, but strictly according to the algorithm. I have seen many similar Expert Advisors, but they all fail, which is logical because they were originally developed incorrectly. I want to challenge the algorithm with the help of my handwriting and get very good results. I want to ask you to write it down for me.
-EA should only control own positions, not touch positions opened manually and/or with help of other EAs.
- The Expert Advisor shouldnot open a position until an already open position has been closed
- The Expert Advisor should be able to work simultaneously on several currency pairs
Instruments: EMA 14
EMA 5
Entry:
Entry is made when both MAs are crossed.
Buy
- When EMA 5 crosses EMA 14 from below, you may enter on the candle following the cross, if it exceeds the high by 1 pip.
Sell
- When EMA5 crossed EMA 14 from above downwards, entry to sell will be made on the candle following the crossing candle, when it dropped below its low by 1 pips.
Exit:
Exit is taken when the opposite signal occurs or when take profit or stop loss is reached
Stop Loss and Take Profit:
Initial stop loss is set at a distance of 30 pips from the entry point .
Initial Take Profit shall be set at 50 pips from the entry point.
When opening positions and setting stop-loss and take-profit, the Expert Advisor shall take into account the spread.
External parameters:
- MA - period 14 Exponential method , shift - 0, apply to close
- MA - period 5 Exponential, shift - 0, apply to close
- Ability to change Take Profit, Stop Loss, and EMA parameters including its method.
Thank you so damn much in advance!