Badorders_v1

Author: Copyright � 2005, MetaQuotes Software Corp.
Profit factor:
2.37

This script, designed for the MetaTrader platform, aims to automatically manage and place trading orders.

Here's a breakdown of what it does, in plain language:

  • Initialization: When the script starts running, it doesn't perform any specific setup actions.

  • Order Management: It tries to close all previously opened positions in the market and then will attempt to place two buy-stop orders in the market.

    • The script closes the order identified by its 'ticket' number, and then try to send one buy-stop.
    • Then it will try to modify this buy stop order to change the entry level of the pending order.
  • Deinitialization: When the script is stopped or removed from the chart, it doesn't perform any specific cleanup actions.

Orders Execution
It Closes Orders by itself It automatically opens orders when conditions are reachedIt can change open orders parameters, due to possible stepping strategy
17 Views
2 Downloads
0 Favorites
Badorders_v1
//+------------------------------------------------------------------+
//|                                                    BadOrders.mq4 |
//|                      Copyright © 2005, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
//----
double asdf;
double ticket, t2;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//---- 
   //This section closes any positions opened on the last tick
   OrderSelect(1,SELECT_BY_POS);
   OrderClose(OrderTicket(),1,Bid,8,Red);
   ticket=OrderSend(Symbol(),OP_BUYSTOP,1,Bid+100*Point,3,0,0,"asdfasdf",16384,0,Green);
   t2=OrderSelect(ticket,SELECT_BY_TICKET);
   OrderModify(OrderTicket(),Bid-100*Point,0,0,0,Green);
   //OrderClose(OrderTicket(),1,Bid,8,Red);
   //OrderSend(Symbol(),OP_BUYSTOP,1,Bid-100*Point,3,0,0,"asdfasdf",16384,0,Green);
//----
   return(0);
  }
//+------------------------------------------------------------------+

Profitability Reports

USD/JPY Jul 2025 - Sep 2025
0.66
Total Trades 139
Won Trades 51
Lost trades 88
Win Rate 36.69 %
Expected payoff -1.87
Gross Profit 513.50
Gross Loss -773.19
Total Net Profit -259.69
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.00
Total Trades 19
Won Trades 0
Lost trades 19
Win Rate 0.00 %
Expected payoff -26.47
Gross Profit 0.00
Gross Loss -502.93
Total Net Profit -502.93
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.09
Total Trades 40
Won Trades 5
Lost trades 35
Win Rate 12.50 %
Expected payoff -6.63
Gross Profit 25.72
Gross Loss -290.95
Total Net Profit -265.23
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.79
Total Trades 57
Won Trades 29
Lost trades 28
Win Rate 50.88 %
Expected payoff -1.23
Gross Profit 264.00
Gross Loss -334.00
Total Net Profit -70.00
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.13
Total Trades 26
Won Trades 5
Lost trades 21
Win Rate 19.23 %
Expected payoff -9.88
Gross Profit 39.00
Gross Loss -296.00
Total Net Profit -257.00
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.00
Total Trades 25
Won Trades 0
Lost trades 25
Win Rate 0.00 %
Expected payoff -25.08
Gross Profit 0.00
Gross Loss -626.99
Total Net Profit -626.99
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.00
Total Trades 25
Won Trades 0
Lost trades 25
Win Rate 0.00 %
Expected payoff -25.70
Gross Profit 0.00
Gross Loss -642.59
Total Net Profit -642.59
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 30
Won Trades 0
Lost trades 30
Win Rate 0.00 %
Expected payoff -9.33
Gross Profit 0.00
Gross Loss -280.00
Total Net Profit -280.00
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
5.78
Total Trades 51
Won Trades 43
Lost trades 8
Win Rate 84.31 %
Expected payoff 3.00
Gross Profit 185.00
Gross Loss -32.00
Total Net Profit 153.00
-100%
-50%
0%
50%
100%
USD/JPY Jan 2025 - Jul 2025
0.20
Total Trades 293
Won Trades 64
Lost trades 229
Win Rate 21.84 %
Expected payoff -3.42
Gross Profit 254.52
Gross Loss -1255.40
Total Net Profit -1000.88
-100%
-50%
0%
50%
100%

Comments