指定
//+------------------------------------------------------------------+
//| EA Cruzamento de Médias MT5 |
//+------------------------------------------------------------------+
#property strict
#include <Trade/Trade.mqh>
CTrade trade;
//---- Inputs
input int FastMAPeriod = 20;
input int SlowMAPeriod = 50;
input double LotSize = 0.01;
input int StopLoss = 300;
input int TakeProfit = 600;
//---- Handles
int fastMAHandle;
int slowMAHandle;
//+------------------------------------------------------------------+
int OnInit()
{
fastMAHandle = iMA(_Symbol, _Period, FastMAPeriod, 0, MODE_EMA, PRICE_CLOSE);
slowMAHandle = iMA(_Symbol, _Period, SlowMAPeriod, 0, MODE_EMA, PRICE_CLOSE);
if(fastMAHandle == INVALID_HANDLE || slowMAHandle == INVALID_HANDLE)
{
Print("Erro ao criar médias");
return(INIT_FAILED);
}
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
void OnTick()
{
if(PositionSelect(_Symbol))
return;
double fastMA[2];
double slowMA[2];
CopyBuffer(fastMAHandle, 0, 0, 2, fastMA);
CopyBuffer(slowMAHandle, 0, 0, 2, slowMA);
double fastCurrent = fastMA[0];
double fastPrevious = fastMA[1];
double slowCurrent = slowMA[0];
double slowPrevious = slowMA[1];
// Cruzamento para compra
if(fastPrevious < slowPrevious && fastCurrent > slowCurrent)
{
trade.Buy(LotSize, _Symbol, Ask, StopLoss * _Point, TakeProfit * _Point);
}
// Cruzamento para venda
if(fastPrevious > slowPrevious && fastCurrent < slowCurrent)
{
trade.Sell(LotSize, _Symbol, Bid, StopLoss * _Point, TakeProfit * _Point);
}
}
//+------------------------------------------------------------------+
反馈
1
等级
项目
60
22%
仲裁
3
33%
/
33%
逾期
15
25%
空闲
2
等级
项目
630
33%
仲裁
38
39%
/
50%
逾期
11
2%
工作中
3
等级
项目
696
34%
仲裁
34
68%
/
9%
逾期
22
3%
工作中
4
等级
项目
2
0%
仲裁
0
逾期
1
50%
空闲
5
等级
项目
24
21%
仲裁
0
逾期
2
8%
空闲
6
等级
项目
39
23%
仲裁
14
0%
/
93%
逾期
4
10%
工作中
7
等级
项目
1
0%
仲裁
2
0%
/
50%
逾期
0
空闲
8
等级
项目
0
0%
仲裁
0
逾期
0
空闲
相似订单
TradingView to MT5 Webhook Bridge - Futures to Spot Execution Project Goal I need a developer to build a bridge between my TradingView indicator in the futures market and my existing MetaTrader 5 EA in the spot market. When my TradingView indicator generates a BUY or SELL signal on a futures symbol, for example 6A1!, it must automatically trigger my MT5 EA to open a trade on the corresponding spot symbol, for example
Robo baseado em estocasticos
50 - 100 USD
Criterios de entrada: 1 stochastico em um tempo gráfico maior, por ex: 1h 1 stochastico em um tempo grafico menor, por ex: 5m *venda: quando o stoch do tempo maior estiver vendido, espera-se o stochastico do tempo menor entrar na zona de overbought e cruzar pra venda, a venda deve ser a mercado na abertura do candle seguinte ao candle que fez o stoch virar pra venda, ou seja a ordem só deve ser aberta quando o candle
项目信息
预算
30+ USD
截止日期
从 1 到 39 天
客户
所下订单1
仲裁计数0