Specification
// Input Parameters
input int TradeExecutionHour = 10; // Trade execution hour (server time)
input bool ManualLotSize = true; // Enable manual lot size adjustment
input bool RiskAllocation = true; // Enable percentage-based risk allocation
input double RiskPercentage = 2.0; // Percentage of risk per trade
input int CandleRangeCondition = 100; // Minimum candle range condition in points
input string Symbols = {"GER30.fin", "EURUSD", "GBPUSD"}; // Symbols to trade
// Global Variables
int ticketBuy, ticketSell;
double entryPointBuy, entryPointSell, stopLossBuy, stopLossSell, takeProfitBuy, takeProfitSell;
bool breakevenBuy = false, breakevenSell = false;
void OnTick()
{
// Check trade execution time
if (TimeHour(TimeCurrent()) == TradeExecutionHour)
{
// Check candle range condition
if (CheckCandleRangeCondition())
{
// Calculate entry points
CalculateEntryPoints();
// Calculate lot size
double lotSize = CalculateLotSize();
// Place buy stop order
ticketBuy = OrderSend(Symbol(), OP_BUYSTOP, lotSize, entryPointBuy, 2 * Point, stopLossBuy, takeProfitBuy);
// Place sell stop order
ticketSell = OrderSend(Symbol(), OP_SELLSTOP, lotSize, entryPointSell, 2 * Point, stopLossSell, takeProfitSell);
}
}
// Check breakeven condition
if (breakevenBuy && breakevenSell)
{
if (CheckBreakevenCondition())
{
// Move stop loss to breakeven
MoveStopLossToBreakeven();
}
}
}
bool CheckCandleRangeCondition()
{
double range = 0;
for (int i = 0; i < 5; i++)
{
range += High[i] - Low[i];
}
range /= 5;
return range >= CandleRangeCondition * Point;
}
void CalculateEntryPoints()
{
double highestHigh = High[1];
double lowestLow = Low[1];
for (int i = 1; i <= 5; i++)
{
if (High[i] > highestHigh)
highestHigh = High[i];
if (Low[i] < lowestLow)
lowestLow = Low[i];
}
entryPointBuy = highestHigh + 2 * Point;
entryPointSell = lowestLow - 2 * Point;
stopLossBuy = lowestLow - 2 * Point;
stopLossSell = highestHigh + 2 * Point;
takeProfitBuy = entryPointBuy + 3 * (entryPointBuy - stopLossBuy);
takeProfitSell = entryPointSell - 3 * (stopLossSell - entryPointSell);
}
double CalculateLotSize()
{
double lotSize = 0;
if (ManualLotSize)
{
// Adjust the lot size manually for each trade
// Add your own logic here
lotSize = 0.01;
}
else if (RiskAllocation)
{
// Calculate lot size based on risk percentage
double accountBalance = AccountBalance();
double riskAmount = accountBalance * RiskPercentage / 100.0;
double stopLossDistance = MathMax(stopLossBuy - entryPointBuy, entryPointSell - stopLossSell);
lotSize = riskAmount / stopLossDistance;
}
return lotSize;
}
bool CheckBreakevenCondition()
{
// Check if the price has reached 1 to 1 ratio
// Add your own logic here
return false;
}
void MoveStopLossToBreakeven()
{
// Move stop loss to breakeven
// Add your own logic here
}
Responded
1
Rating
Projects
1
0%
Arbitration
3
33%
/
67%
Overdue
0
Free
2
Rating
Projects
105
24%
Arbitration
8
38%
/
25%
Overdue
8
8%
Loaded
3
Rating
Projects
455
52%
Arbitration
22
50%
/
27%
Overdue
5
1%
Loaded
4
Rating
Projects
68
25%
Arbitration
12
42%
/
42%
Overdue
4
6%
Free
5
Rating
Projects
3042
66%
Arbitration
77
48%
/
14%
Overdue
340
11%
Working
6
Rating
Projects
418
34%
Arbitration
52
37%
/
40%
Overdue
153
37%
Busy
7
Rating
Projects
16
25%
Arbitration
0
Overdue
1
6%
Free
8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
9
Rating
Projects
59
27%
Arbitration
25
20%
/
52%
Overdue
10
17%
Working
10
Rating
Projects
175
71%
Arbitration
4
100%
/
0%
Overdue
1
1%
Free
11
Rating
Projects
15
27%
Arbitration
3
67%
/
33%
Overdue
0
Free
12
Rating
Projects
11
0%
Arbitration
4
25%
/
50%
Overdue
2
18%
Free
13
Rating
Projects
77
8%
Arbitration
33
9%
/
55%
Overdue
6
8%
Working
14
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
15
Rating
Projects
641
41%
Arbitration
21
57%
/
29%
Overdue
47
7%
Working
16
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
17
Rating
Projects
61
7%
Arbitration
22
23%
/
36%
Overdue
4
7%
Busy
Similar orders
Boulē’s Full Margin Trader
30 - 50 USD
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
Copier EA triggered via Mobile
30 - 100 USD
So i have copier EA. The idea is the EA will triggered through manual OP by user via mobile or whatever platform. Let's say 0.01 lot to trigger it. After the EA takes master's position, the EA will be standby mode. If the master take more OP, the EA still not take the master's position (OP) until the user input manually once again via mobile for another 0.01 lot. Since this is a MT4 EA, Whenever user want to close
Criação de robo com base em 2 medias móveis
30 - 50 USD
preciso de um robô com duas médias móveis, uma exponencial high e uma exponencial low. preciso também ter a opção de utilizar e todos os tempos gráficos e alterar os parâmetros das médias. entrada de compra será feita quando um candle de alta romper e fechar a cima da média high e fechará a posição quando um candle de baixa romper e fechar a baixo da média low. a venda será feita quando o candle de baixa romper e
Simple EA, placing Sell trades in EUR/USD
30 - 200 USD
Description - An expert advisor(s), placing sell trades in EUR/USD, based on the close price of the previous two candles, as shown in the figure below. The trades would be made in the 5 minute, 1 hour, and 1 day timeframes. In the 5 minute and 1 hour timeframes the market orders would be placed at the start of a new candle, at specific times EST. The order would be cancelled at the close of that candle, i.e after 5
Greetings, As the title suggests, I am trying to convert an indicator that calls itself via an iCustom call like this. iMAArray_Buffer[loop_1] = iCustom ( NULL , Selected_TF, MQLInfoString ( MQL_PROGRAM_NAME ), "calculate" , RPeriod, MType, MPeriod, 1 , shift); Full code will not be provided, only the position that needs fixing. I cannot get this working in MQL5 but the original code runs smoothly in MQL4. Please
Copy indicator for mt5
30+ USD
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Copy indicator for Mt5
30+ USD
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Greetings great developer, I am in search of a highly skilled developer to assist with an exciting project. I need to convert two open-source TradingView indicators to NinjaTrader 8 and implement a usage restriction based on computer IDs. If you have experience with NinjaTrader 8 coding please let me know. I’d be happy to discuss the details further
Greetings great developer, I am in search of a highly skilled MQL5 developer to assist with an exciting project. I need to convert two open-source TradingView indicators to NinjaTrader 8 and implement a usage restriction based on computer IDs. If you have experience with NinjaTrader 8 coding please let me know. I’d be happy to discuss the details further
Project information
Budget
30 - 50 USD
VAT (21%):
6.3
- 10.5
USD
Total:
36.3
- 60.5
USD
For the developer
27
- 45
USD