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

This script is designed to automate a specific sequence of trade executions and modifications on the MetaTrader platform. Its primary logic focuses on rapid cycle management by closing existing positions and immediately placing new ones with adjusted parameters.

Here is a breakdown of how the logic functions:

Position Management The script begins by scanning the active trading list. It identifies the position currently held at the second index of the open orders and automatically closes it. This ensures that any previous trades are cleared out before the script moves on to its next objective.

Trade Execution Immediately after closing the previous position, the script generates a new "Buy Stop" order. This is a pending order placed at a price slightly above the current market price. The script sets specific parameters for this trade, including a designated volume and a unique identification label.

Dynamic Modification Once the new pending order is successfully placed into the system, the script instantly detects its unique ID. It then performs an automated modification on that specific order, shifting its entry price to a level slightly below the current market price.

Summary of Workflow In simple terms, the script follows a "clear and reposition" cycle:

  1. Clear: It closes an existing active trade.
  2. Place: It opens a new pending buy order at a higher price point.
  3. Adjust: It immediately moves that pending order to a lower price point to redefine the entry conditions.
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
16 Views
0 Downloads
0 Favorites
BadOrders
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                                    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

PERFORMANCE BY SYMBOL

Expected payoff

Average expected payoff across the available backtests for each symbol.

Positive Negative
34 reports
GBP/USD Oct 2024 - Jan 2025
41.42
Total Trades 28
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff 17.32
Gross Profit 497.00
Gross Loss -12.00
Total Net Profit 485.00
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.96
Total Trades 20
Won Trades 14
Lost trades 6
Win Rate 70.00 %
Expected payoff -0.06
Gross Profit 28.98
Gross Loss -30.25
Total Net Profit -1.27
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.94
Total Trades 20
Won Trades 9
Lost trades 11
Win Rate 45.00 %
Expected payoff -0.15
Gross Profit 44.08
Gross Loss -47.01
Total Net Profit -2.93
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.80
Total Trades 57
Won Trades 29
Lost trades 28
Win Rate 50.88 %
Expected payoff -1.19
Gross Profit 264.00
Gross Loss -332.00
Total Net Profit -68.00
-100%
-50%
0%
50%
100%
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/JPY Jul 2025 - Sep 2025
0.61
Total Trades 136
Won Trades 45
Lost trades 91
Win Rate 33.09 %
Expected payoff -1.86
Gross Profit 392.08
Gross Loss -645.41
Total Net Profit -253.33
-100%
-50%
0%
50%
100%
EUR/USD Oct 2025 - Feb 2026
0.44
Total Trades 52
Won Trades 25
Lost trades 27
Win Rate 48.08 %
Expected payoff -5.33
Gross Profit 221.00
Gross Loss -498.00
Total Net Profit -277.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%
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/USD Jul 2025 - Sep 2025
0.13
Total Trades 26
Won Trades 5
Lost trades 21
Win Rate 19.23 %
Expected payoff -10.00
Gross Profit 39.00
Gross Loss -299.00
Total Net Profit -260.00
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.10
Total Trades 49
Won Trades 9
Lost trades 40
Win Rate 18.37 %
Expected payoff -4.18
Gross Profit 22.00
Gross Loss -227.00
Total Net Profit -205.00
-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.50
Gross Profit 25.72
Gross Loss -285.80
Total Net Profit -260.08
-100%
-50%
0%
50%
100%
GBP/AUD Oct 2025 - Feb 2026
0.06
Total Trades 56
Won Trades 12
Lost trades 44
Win Rate 21.43 %
Expected payoff -18.04
Gross Profit 66.80
Gross Loss -1076.98
Total Net Profit -1010.18
-100%
-50%
0%
50%
100%
AUD/USD Jan 2025 - Jul 2025
0.02
Total Trades 30
Won Trades 1
Lost trades 29
Win Rate 3.33 %
Expected payoff -134.17
Gross Profit 83.00
Gross Loss -4108.00
Total Net Profit -4025.00
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.01
Total Trades 39
Won Trades 1
Lost trades 38
Win Rate 2.56 %
Expected payoff -6.55
Gross Profit 2.22
Gross Loss -257.79
Total Net Profit -255.57
-100%
-50%
0%
50%
100%
USD/CHF Jan 2025 - Jul 2025
0.01
Total Trades 67
Won Trades 1
Lost trades 66
Win Rate 1.49 %
Expected payoff -14.95
Gross Profit 9.94
Gross Loss -1011.88
Total Net Profit -1001.94
-100%
-50%
0%
50%
100%
AUD/USD Oct 2025 - Feb 2026
0.01
Total Trades 49
Won Trades 5
Lost trades 44
Win Rate 10.20 %
Expected payoff -4.16
Gross Profit 2.00
Gross Loss -206.00
Total Net Profit -204.00
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%
EUR/USD Jan 2025 - Jul 2025
0.00
Total Trades 29
Won Trades 0
Lost trades 29
Win Rate 0.00 %
Expected payoff -20.48
Gross Profit 0.00
Gross Loss -594.00
Total Net Profit -594.00
-100%
-50%
0%
50%
100%
GBP/AUD Jan 2025 - Jul 2025
0.00
Total Trades 25
Won Trades 0
Lost trades 25
Win Rate 0.00 %
Expected payoff -25.68
Gross Profit 0.00
Gross Loss -642.06
Total Net Profit -642.06
-100%
-50%
0%
50%
100%
GBP/CAD Jan 2025 - Jul 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%
GBP/USD Jan 2025 - Jul 2025
0.00
Total Trades 25
Won Trades 0
Lost trades 25
Win Rate 0.00 %
Expected payoff -25.76
Gross Profit 0.00
Gross Loss -644.00
Total Net Profit -644.00
-100%
-50%
0%
50%
100%
NZD/USD Jan 2025 - Jul 2025
0.00
Total Trades 54
Won Trades 0
Lost trades 54
Win Rate 0.00 %
Expected payoff -10.50
Gross Profit 0.00
Gross Loss -567.00
Total Net Profit -567.00
-100%
-50%
0%
50%
100%
USD/CAD Jan 2025 - Jul 2025
0.00
Total Trades 48
Won Trades 0
Lost trades 48
Win Rate 0.00 %
Expected payoff -10.53
Gross Profit 0.00
Gross Loss -505.36
Total Net Profit -505.36
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.00
Total Trades 22
Won Trades 0
Lost trades 22
Win Rate 0.00 %
Expected payoff -5.23
Gross Profit 0.00
Gross Loss -115.00
Total Net Profit -115.00
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 14
Won Trades 0
Lost trades 14
Win Rate 0.00 %
Expected payoff -14.36
Gross Profit 0.00
Gross Loss -201.00
Total Net Profit -201.00
-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%
GBP/CAD Jul 2025 - Sep 2025
0.00
Total Trades 12
Won Trades 0
Lost trades 12
Win Rate 0.00 %
Expected payoff -33.99
Gross Profit 0.00
Gross Loss -407.86
Total Net Profit -407.86
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.00
Total Trades 24
Won Trades 0
Lost trades 24
Win Rate 0.00 %
Expected payoff -18.50
Gross Profit 0.00
Gross Loss -444.00
Total Net Profit -444.00
-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%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 30
Won Trades 0
Lost trades 30
Win Rate 0.00 %
Expected payoff -8.37
Gross Profit 0.00
Gross Loss -251.00
Total Net Profit -251.00
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.00
Total Trades 27
Won Trades 0
Lost trades 27
Win Rate 0.00 %
Expected payoff -23.56
Gross Profit 0.00
Gross Loss -636.23
Total Net Profit -636.23
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.00
Total Trades 0
Won Trades 0
Lost trades 0
Win Rate 0.0 %
Expected payoff 0.00
Gross Profit 0.00
Gross Loss 0.00
Total Net Profit 0.00
-100%
-50%
0%
50%
100%
GBP/CAD Oct 2025 - Feb 2026
0.00
Total Trades 127
Won Trades 0
Lost trades 127
Win Rate 0.00 %
Expected payoff -37.70
Gross Profit 0.00
Gross Loss -4787.67
Total Net Profit -4787.67
-100%
-50%
0%
50%
100%

Comments