Orders Execution
0
Views
0
Downloads
0
Favorites
Profitability Reports
AUD/USD
Oct 2024 - Jan 2025
50.00 %
Total Trades
67
Won Trades
0
Lost trades
0
Win Rate
0.00 %
Expected payoff
-1.98
Gross Profit
130.00
Gross Loss
-262.40
Total Net Profit
-132.40
-100%
-50%
0%
50%
100%
GBP/USD
Oct 2024 - Jan 2025
47.00 %
Total Trades
72
Won Trades
28
Lost trades
44
Win Rate
0.39 %
Expected payoff
-2.15
Gross Profit
140.00
Gross Loss
-294.80
Total Net Profit
-154.80
-100%
-50%
0%
50%
100%
TimeBasedEA
//+------------------------------------------------------------------+
//| MACD Sample.mq4 |
//| Copyright © 2005, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
extern int MagicNumber = 16384;
extern double TakeProfit = 50;
extern double StopLoss = 50;
extern double Lots = 0.1;
extern int OpenTradeTime = 1100; // Open Trade time
extern int MinutesToWaitForTick = 2;
extern bool OpenBuy = true;
extern bool OpenSell = false;
extern int NumBuys = 1;
extern int NumSells = 1;
extern int Slippage = 3;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
int cnt, ticket, total;
int ct, EndTradeTime;
// initial data checks
// it is important to make sure that the expert works with a normal
// chart and the user did not make any mistakes setting external
// variables (Lots, StopLoss, TakeProfit,
// TrailingStop) in our case, we check TakeProfit
// on a chart of less than 100 bars
if(Bars<100)
{
Print("bars less than 100");
return(0);
}
// if(TakeProfit<10)
// {
// Print("TakeProfit less than 10");
// return(0); // check TakeProfit
// }
ct = Hour() * 100 + Minute();
EndTradeTime = OpenTradeTime + MinutesToWaitForTick;
total=OrdersTotal();
if(total<1)
{
// no opened orders identified
if(AccountFreeMargin()<(1000*Lots))
{
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
// check for long position (BUY) possibility
if(ct >= OpenTradeTime && ct < EndTradeTime)
{
if (OpenBuy)
{
for ( cnt = 0; cnt < NumBuys; cnt++)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,Bid - StopLoss * Point,Ask+TakeProfit*Point,"",MagicNumber,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
}
}
// check for short position (SELL) possibility
if(OpenSell)
{
for ( cnt = 0; cnt < NumSells; cnt++)
{
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,Ask + StopLoss * Point,Bid-TakeProfit*Point,"",MagicNumber,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
}
else Print("Error opening SELL order : ",GetLastError());
}
}
}
}
return(0);
}
// the end.
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---