Specification
//+------------------------------------------------------------------+
//| M65 PRO ROBOT |
//| Trend + RSI + Risk Management |
//+------------------------------------------------------------------+
#property strict
input double LotSize = 0.01;
input int StopLoss = 100; // points
input int TakeProfit = 200; // points
input int RSI_Period = 14;
int rsiHandle;
int ema50Handle;
int ema200Handle;
//+------------------------------------------------------------------+
int OnInit()
{
rsiHandle = iRSI(_Symbol, PERIOD_M5, RSI_Period, PRICE_CLOSE);
ema50Handle = iMA(_Symbol, PERIOD_M5, 50, 0, MODE_EMA, PRICE_CLOSE);
ema200Handle = iMA(_Symbol, PERIOD_M5, 200, 0, MODE_EMA, PRICE_CLOSE);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
void OnTick()
{
double rsi[], ema50[], ema200[];
CopyBuffer(rsiHandle, 0, 0, 1, rsi);
CopyBuffer(ema50Handle, 0, 0, 1, ema50);
CopyBuffer(ema200Handle, 0, 0, 1, ema200);
if(PositionSelect(_Symbol)) return;
double Ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
double Bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
// BUY CONDITION
if(ema50[0] > ema200[0] && rsi[0] > 55)
{
trade.Buy(LotSize, _Symbol, Ask, Ask - StopLoss * _Point, Ask + TakeProfit * _Point);
}
// SELL CONDITION
if(ema50[0] < ema200[0] && rsi[0] < 45)
{
trade.Sell(LotSize, _Symbol, Bid, Bid + StopLoss * _Point, Bid - TakeProfit * _Point);
}
}
Responded
1
Rating
Projects
39
23%
Arbitration
14
0%
/
93%
Overdue
4
10%
Free
2
Rating
Projects
239
33%
Arbitration
20
45%
/
30%
Overdue
2
1%
Free
3
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Published: 8 codes
4
Rating
Projects
1732
49%
Arbitration
53
70%
/
13%
Overdue
38
2%
Free
5
Rating
Projects
2925
63%
Arbitration
123
45%
/
25%
Overdue
429
15%
Working
6
Rating
Projects
2
0%
Arbitration
1
0%
/
100%
Overdue
0
Free
7
Rating
Projects
1
0%
Arbitration
1
0%
/
0%
Overdue
0
Working
8
Rating
Projects
7
0%
Arbitration
8
13%
/
75%
Overdue
3
43%
Free
9
Rating
Projects
477
40%
Arbitration
105
40%
/
24%
Overdue
81
17%
Loaded
Published: 2 codes
10
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
11
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
Similar orders
Robot THC
100+ USD
Les positions des clôtures des signaux : La position des achats sont clôturées aux signaux de vente, et la position des ventes sont clôturées aux signaux des achats. Les positions sont clôturées aux prix du marché à l'apparition d'une nouvelle barre
Project information
Budget
30 - 200 USD
Deadline
from 3 to 5 day(s)