Moving Avarage Cross Over

MQL4 Experts Forex

Trabalho concluído

Tempo de execução 8 minutos
Comentário do desenvolvedor
Very clear specifications. Good to work! Excellent customer... Thank you :)
Comentário do cliente
Great Developer, he was fast and did precisely what I wanted. Also Flexible in my demands. 5 Stars

Termos de Referência

I am looking to further develop a simple EA I already made that is based on MA crossover.

The problem with the one I have, it uses TP and SL to close a trade.

I would for the order to close when the next cross over happens, the old order will close and the new one will open.


Below is what I have so far:


//+------------------------------------------------------------------+
//|                                       MovingAverageCrossover.mq4 |
//|                                                           737ngx |
//|                                        https://www.737ngxsim.com |
//+------------------------------------------------------------------+
#property copyright "737ngx"
#property link      "https://www.737ngxsim.com"
#property version   "1.00"
#property strict

extern int TakeProfit=50;
extern int StopLoss=25;
extern int FastMA=15;
extern int FastMaShift=0;
extern int FastMaMethod=1;
extern int FastMaAppliedTo=0;
extern int SlowMA=50;
extern int SlowMaShift=0;
extern int SlowMaMethod=1;
extern int SlowMaAppliedTo=0;
extern double LotSize = 0.01;
extern int MagicNumber = 1234;
double pips; 
 

//+------------------------------------------------------------------+ 
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
  
double ticksize = MarketInfo(Symbol(), MODE_TICKSIZE);
   if (ticksize == 0.00001 || ticksize == 0.001)
   pips = ticksize*10;
   else pips = ticksize;
return(INIT_SUCCEEDED);
  }
  
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//---
   return (0);
   
  }
  
 //+------------------------------------------------------------------+
//| Expert start function                                 |
//+------------------------------------------------------------------+
 
 
  
  int start()
  {

               
   return(0); 
  
  }
  
  
  
  
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//---
double PreviousFast = iMA(NULL,0,FastMA,FastMaShift,FastMaMethod,FastMaAppliedTo,2);
    double CurrentFast =  iMA(NULL,0,FastMA,FastMaShift,FastMaMethod,FastMaAppliedTo,1);
      
    double PreviousSlow = iMA(NULL,0,SlowMA,SlowMaShift,SlowMaMethod,SlowMaAppliedTo,2);
    double CurrrentSlow = iMA(NULL,0,SlowMA,SlowMaShift,SlowMaMethod,SlowMaAppliedTo,1);
    
    if(PreviousFast<PreviousSlow && CurrentFast>CurrrentSlow)
         if(OrdersTotal()==0)
            OrderSend(Symbol(),OP_BUY,LotSize,Bid,3,Bid-(StopLoss*pips),Bid+(TakeProfit*pips),NULL,MagicNumber,0,Green);
         
    if(PreviousFast>PreviousSlow && CurrentFast<CurrrentSlow)
         if(OrdersTotal()==0) 
            OrderSend(Symbol(),OP_SELL,LotSize,Bid,3,Bid+(StopLoss*pips),Bid-(TakeProfit*pips),NULL,MagicNumber,0,Red);
   
  }
//+------------------------------------------------------------------+



Respondido

1
Desenvolvedor 1
Classificação
(229)
Projetos
339
49%
Arbitragem
21
5% / 33%
Expirado
24
7%
Livre
2
Desenvolvedor 2
Classificação
(4)
Projetos
5
20%
Arbitragem
3
33% / 33%
Expirado
0
Livre
3
Desenvolvedor 3
Classificação
(365)
Projetos
412
36%
Arbitragem
35
26% / 57%
Expirado
63
15%
Livre
4
Desenvolvedor 4
Classificação
(114)
Projetos
154
47%
Arbitragem
2
0% / 50%
Expirado
4
3%
Livre
5
Desenvolvedor 5
Classificação
(15)
Projetos
24
21%
Arbitragem
1
0% / 100%
Expirado
7
29%
Livre
6
Desenvolvedor 6
Classificação
(547)
Projetos
757
46%
Arbitragem
23
39% / 13%
Expirado
63
8%
Trabalhando
7
Desenvolvedor 7
Classificação
(1127)
Projetos
1429
62%
Arbitragem
21
57% / 10%
Expirado
43
3%
Livre
8
Desenvolvedor 8
Classificação
(65)
Projetos
87
39%
Arbitragem
3
0% / 33%
Expirado
29
33%
Livre
9
Desenvolvedor 9
Classificação
(2)
Projetos
2
0%
Arbitragem
0
Expirado
0
Livre
10
Desenvolvedor 10
Classificação
(769)
Projetos
1033
44%
Arbitragem
50
8% / 50%
Expirado
117
11%
Livre
11
Desenvolvedor 11
Classificação
(221)
Projetos
369
66%
Arbitragem
10
50% / 0%
Expirado
46
12%
Livre
12
Desenvolvedor 12
Classificação
(2077)
Projetos
2636
61%
Arbitragem
113
45% / 26%
Expirado
418
16%
Trabalhando
13
Desenvolvedor 13
Classificação
(1086)
Projetos
1437
45%
Arbitragem
48
73% / 13%
Expirado
35
2%
Trabalhando
14
Desenvolvedor 14
Classificação
(7)
Projetos
8
38%
Arbitragem
3
33% / 33%
Expirado
2
25%
Livre
15
Desenvolvedor 15
Classificação
(4)
Projetos
6
0%
Arbitragem
2
0% / 50%
Expirado
4
67%
Livre
16
Desenvolvedor 16
Classificação
(117)
Projetos
138
41%
Arbitragem
30
7% / 77%
Expirado
17
12%
Livre
17
Desenvolvedor 17
Classificação
(2)
Projetos
2
0%
Arbitragem
0
Expirado
1
50%
Livre
18
Desenvolvedor 18
Classificação
(548)
Projetos
825
73%
Arbitragem
15
53% / 13%
Expirado
193
23%
Trabalhando
19
Desenvolvedor 19
Classificação
(461)
Projetos
902
77%
Arbitragem
25
16% / 68%
Expirado
100
11%
Livre
20
Desenvolvedor 20
Classificação
(563)
Projetos
932
47%
Arbitragem
301
59% / 25%
Expirado
124
13%
Trabalhando
Pedidos semelhantes
I want to make a new dashboard using 3 common indicators and the ADX indicator , which you must supply I have a MA dash which you can strip & reuse if it helps you I tried to cover all questions in the attached but i'm sure there'll be more
I want the script in mql5 language for my martingale strategy. The script should open trades in both directions buy and sell and if any trade closes in loss then open new trade in that direction by using the next volume and when trade closes in profit then reset the volume to first from volume list and also maximum consecutive losses limit will apply. If trades closes consecutively in losses and hits the limit then
I installed the E.A. into the Experts folder in MT4. When I double click on it nothing happens. When I right click and "attach to chart" nothing happens. The E.A. is not grayed out, it simply will not attach. Any help would be greatly Appreciated
Lilit ordrer 50+ USD
l doa language that allows creating trading robots and technical indicators. i can do any writing and translation so dont worry i can do what you want ke to do
hi hi there i have an strategy on tradingview and i want to automate it like metatrader EA so i want the strategy to open and close trade automaticlly on tradingview
We are looking for an experienced Expert Advisor Developer who can build a customized MT5 Expert Advisor for us. The Expert Advisor would use two built-in indicators as entry/exit signals and our own risk management strategy with customizable inputs. The goal is to create a reliable and efficient trading tool that can automate our trading process on the MT5 platform. Skills required: - Strong understanding of
The wiper 35 - 48 USD
a ll traders want to find market behavior patterns, which could help identify favorable moments for performing trading operations. They also want to eliminate randomness and influence of external factors, such as rumors, news releases, fatigue, and so on. Traders monitor charts and may formulate some formal rules, which enable objective analysis of price or tick charts. Technical indicators can facilitate such
I need EA that works on MT5 to be able to do the following: - Can recognize Support/Resistance area - Can recognize VWAP direction. - Can recognize RSI. - Can recognize Double Top/bottom, Bullish/Bearish hammer candle, Bullish/bearish engulfing candle. - Ability to set Stoploss below/above support/resistance, but risk must be fixed at a certain price. - Stoploss
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
I am seeking a highly skilled and experienced developer to assist with an important project. I need a development of an automated trading bot for NinjaTrader, utilizing a 4 SMA (Simple Moving Average) crossing strategy, with additional custom diversions for trade entries. The bot needs to be based on a strategy involving the crossing of four different SMAs. The exact periods for these SMAs and the conditions for

Informações sobre o projeto

Orçamento
30 - 40 USD
IVA (21%): 6.3 - 8.4 USD
Total: 36.3 - 48.4 USD
Desenvolvedor
27 - 36 USD