Price Data Components
Orders Execution
0
Views
0
Downloads
0
Favorites
Profitability Reports
AUD/USD
Oct 2024 - Jan 2025
46.00 %
Total Trades
738
Won Trades
0
Lost trades
0
Win Rate
0.00 %
Expected payoff
-8.71
Gross Profit
5494.70
Gross Loss
-11925.00
Total Net Profit
-6430.30
-100%
-50%
0%
50%
100%
GBP/USD
Oct 2024 - Jan 2025
54.00 %
Total Trades
2055
Won Trades
462
Lost trades
1593
Win Rate
0.22 %
Expected payoff
-4.54
Gross Profit
11000.40
Gross Loss
-20322.00
Total Net Profit
-9321.60
-100%
-50%
0%
50%
100%
qq_v2.3_gbpusd_MM
// Because of my dismal stupidity not even named this EA
#property copyright "RamilT"
#property link "RamilT@bk.ru"
//-----------------------------------Òèïà ïåðåìåííûå-----------------------------------------------------------
extern int Magic = 2222;
extern int pr=12;
extern int sl=30;
extern int tp=100;
extern int tz=50;
extern int mm=1;
extern int qq=10;
extern int chas1=5;
extern int chas2=17;
extern double Lots=1;
extern double TrailingStop =50;
double BuyStop=0, PrevBuyStop=0, SellStop=0, PrevSellStop=0;
double Slippage =3;
//-------------------------------------------------------------------------------------------------------------
int start()
{
if(Hour()<=chas1||Hour()>=chas2)return(0);
if(Bars<100)
{
Print("bars less than 100");
return(0);
}
//-----------------------------------Ìîíýé ìåíäæìåíò-----------------------------------------------------------
if (ScanTrades()>0 && TrailingStop > 0) HideTrailStop();
if (mm==1)
{
if(Lots<(MathCeil((AccountFreeMargin()/1000)*qq)/10)){Lots=(MathCeil((AccountFreeMargin()/10000)*qq)/10);if(Lots>100){Lots=100;}}
}
//-------------------------------------------------------------------------------------------------------------
//----------------------------------Ãëàâíûé àëãîðèòì-----------------------------------------------------------
if(Month()!=12 && DayOfWeek()!=1 && ScanTrades()<1)
{
if (((iOpen(NULL,5,1)-iClose(NULL,5,pr))>(Point*tz))&&(Ask>iOpen(NULL,5,1)))
{
if( tp>0 ) double TakeProfit = NormalizeDouble(Ask+tp*Point,Digits); else TakeProfit = 0;
if( sl>0 ) double StopLoss = NormalizeDouble(Ask-sl*Point,Digits); else StopLoss = 0;
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,StopLoss,TakeProfit,"qq-buy60",Magic,0,Blue);
}
if (((iOpen(NULL,5,1)-iClose(NULL,5,pr))<(-Point*tz))&&(Bid<iOpen(NULL,5,1)))
{
if( tp>0 ) TakeProfit = NormalizeDouble(Bid-tp*Point,Digits); else TakeProfit = 0;
if( sl>0 ) StopLoss = NormalizeDouble(Bid+sl*Point,Digits); else StopLoss = 0;
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,StopLoss,TakeProfit,"qq-sell60",Magic,0,Red);
}
}
return(0);
}
//-------------------------------------------------------------------------------------------------------------
int ScanTrades()
{
int total = OrdersTotal();
int numords = 0;
for(int cnt=0; cnt<total; cnt++)
{
OrderSelect(cnt, SELECT_BY_POS);
if(OrderSymbol() == Symbol() && OrderType()<=OP_SELLSTOP && OrderMagicNumber() == Magic)
numords++;
}
return(numords);
}
void HideTrailStop()
{
for (int cnt=0;cnt<OrdersTotal();cnt++)
{
OrderSelect(cnt, SELECT_BY_POS);
int mode=OrderType();
if ( OrderSymbol()==Symbol() && OrderMagicNumber()==Magic)
{
if (mode==OP_BUY)
{
BuyStop = NormalizeDouble(Bid - TrailingStop*Point, Digits);
if (BuyStop > OrderStopLoss())
{
if( OrderOpenPrice() <= BuyStop )
{
OrderModify(OrderTicket(),OrderOpenPrice(),
BuyStop,
OrderTakeProfit(),0,Yellow);
return(0);
}
}
}
// - SELL Orders
if (mode==OP_SELL)
{
SellStop = NormalizeDouble(Ask + TrailingStop*Point, Digits);
if (SellStop < OrderStopLoss())
{
if( OrderOpenPrice() >= SellStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),
SellStop,
OrderTakeProfit(),0,Yellow);
return(0);
}
}
}
}
}
}
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
---