UpDn-Alexander Piechotta-30

Profit factor:
20.77

This script is designed to automatically place and manage trades in a financial market, likely forex or stocks, based on a specific technical indicator called "Bulls Power." Here's a breakdown of how it works:

1. Setting the Stage:

  • The script starts by defining several adjustable parameters:
    • TakeProfit: This determines how much profit the script aims to make on each trade, measured in points (a unit of price movement).
    • Lots: This defines the size of the trades the script will make.
    • TrailingStop: This is a safety net that automatically adjusts the stop-loss level as the price moves in a favorable direction, locking in profits.
    • StopLoss: This sets the maximum amount of money the script is willing to lose on a trade.

2. Reading the Market:

  • The script constantly monitors the market using the "Bulls Power" indicator. This indicator is a tool that attempts to gauge the strength of buyers in the market.
  • It looks at the "Bulls Power" value at two different points in time: the previous bar and the current bar.

3. Managing Existing Trades:

  • Closing Losing Positions: If the "Bulls Power" indicates a weakening buying trend (previous Bulls Power is higher than the current) the script first tries to close existing buy orders (hoping to close winning positions using a trailing stop).
  • Closing Winning Positions: Similarly, if the "Bulls Power" suggests a bearish market, the script attempts to close existing sell orders (using trailing stops).

4. Opening New Trades:

  • The script opens new trades only if it doesn't already have an open trade.
  • Selling: If the "Bulls Power" reading suggests weakening buying pressure (previous higher than current) and the current value is above zero, the script will place a sell order.
  • Buying: If the "Bulls Power" indicator shows a negative value, suggesting strong potential for a price increase, the script will place a buy order.

5. Order Execution:

  • When the script decides to open a trade, it sends an order to the trading platform.
  • The order includes:
    • The direction of the trade (buy or sell).
    • The size of the trade (Lots).
    • The stop-loss level (StopLoss).
    • The take-profit level (TakeProfit).

In essence, this script automatically analyzes the market using the "Bulls Power" indicator and places trades based on its readings, aiming to profit from short-term price movements while attempting to limit potential losses.

Orders Execution
Checks for the total of open ordersIt Closes Orders by itself It automatically opens orders when conditions are reached
Indicators Used
Bulls Power indicator
14 Views
1 Downloads
0 Favorites
UpDn-Alexander Piechotta-30
//+------------------------------------------------------------------+
extern double TakeProfit = 7; 
extern double Lots = 0.1; 
extern double TrailingStop = 5; 
extern double StopLoss = 30; 

int start() 
{ 
double pos1pre=0; 
double  pos2cur=0; 
int cnt=0; 
int mode=0; 
double openpozprice=0; 




pos1pre = iBullsPower(NULL,0,1,PRICE_WEIGHTED,1); 
pos2cur = iBullsPower(NULL,0,1,PRICE_WEIGHTED,0); 
//Comment("??????? ???????  ",pos2cur,"Previous pos", pos1pre ); 

if (pos1pre >pos2cur) { 
//????????? ??????? ??????? 

for (cnt=1; cnt<OrdersTotal(); cnt++) 

{ 

OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); 
        if( OrderSymbol()==Symbol() && OrderType()==OP_BUY ) 


         { 
         if (Bid>(OrderOpenPrice()+TrailingStop*Point)) 
     { 
       OrderClose(OrderTicket(),OrderLots(),Bid,5,Violet); 
     return(0); 
         } 
         } 
  } 
} 


if (pos2cur<0) 
//????????? ???????? ??????? 

{ 

for (cnt=1; cnt<OrdersTotal(); cnt++) 
{ 


OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES); 
      if( OrderSymbol()==Symbol() && OrderType()==OP_SELL ) 
         { 

   if (Ask< (OrderOpenPrice()-TrailingStop*Point)) 
         { 
                    OrderClose(OrderTicket(),OrderLots(),Ask,5,Violet); 
     return(0); 
           }       } 
      } 
} 


if (OrdersTotal() < 1 ) 
{ 

Print("pos1pre = "+pos1pre+"    pos2cur ="+pos2cur); 
if (pos1pre>pos2cur && pos2cur>0)       { 

int ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,Bid-TakeProfit*Point,"",0,0,Gold); 
            return(0); 
    } 
   // ????????? ?? ??????????? ?????? ? ??????? ??????? (BUY) 

if (pos2cur<0)   { 
// print("K = "+K+"   S ="+S); 
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,Ask+TakeProfit*Point,"",0,0,Gold); 
    return(0); 
   } 
  } 

} 

Profitability Reports

USD/CHF Jan 2025 - Jul 2025
645.04
Total Trades 392
Won Trades 391
Lost trades 1
Win Rate 99.74 %
Expected payoff 0.82
Gross Profit 322.52
Gross Loss -0.50
Total Net Profit 322.02
-100%
-50%
0%
50%
100%
AUD/USD Oct 2024 - Jan 2025
4.15
Total Trades 308
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff 0.53
Gross Profit 214.90
Gross Loss -51.80
Total Net Profit 163.10
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
3.76
Total Trades 258
Won Trades 257
Lost trades 1
Win Rate 99.61 %
Expected payoff 0.51
Gross Profit 179.90
Gross Loss -47.80
Total Net Profit 132.10
-100%
-50%
0%
50%
100%
USD/CAD Jan 2025 - Jul 2025
3.02
Total Trades 293
Won Trades 292
Lost trades 1
Win Rate 99.66 %
Expected payoff 0.34
Gross Profit 147.21
Gross Loss -48.79
Total Net Profit 98.42
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
2.22
Total Trades 398
Won Trades 397
Lost trades 1
Win Rate 99.75 %
Expected payoff 0.38
Gross Profit 277.90
Gross Loss -125.40
Total Net Profit 152.50
-100%
-50%
0%
50%
100%
USD/JPY Jan 2025 - Jul 2025
1.57
Total Trades 942
Won Trades 941
Lost trades 1
Win Rate 99.89 %
Expected payoff 0.17
Gross Profit 444.18
Gross Loss -283.64
Total Net Profit 160.54
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.91
Total Trades 108
Won Trades 107
Lost trades 1
Win Rate 99.07 %
Expected payoff -0.07
Gross Profit 74.90
Gross Loss -82.60
Total Net Profit -7.70
-100%
-50%
0%
50%
100%
NZD/USD Jul 2025 - Sep 2025
0.78
Total Trades 94
Won Trades 93
Lost trades 1
Win Rate 98.94 %
Expected payoff -0.19
Gross Profit 65.10
Gross Loss -83.20
Total Net Profit -18.10
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.48
Total Trades 287
Won Trades 286
Lost trades 1
Win Rate 99.65 %
Expected payoff -0.74
Gross Profit 200.20
Gross Loss -413.10
Total Net Profit -212.90
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.42
Total Trades 97
Won Trades 96
Lost trades 1
Win Rate 98.97 %
Expected payoff -0.63
Gross Profit 44.34
Gross Loss -105.14
Total Net Profit -60.80
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.37
Total Trades 30
Won Trades 29
Lost trades 1
Win Rate 96.67 %
Expected payoff -1.47
Gross Profit 25.76
Gross Loss -69.91
Total Net Profit -44.15
-100%
-50%
0%
50%
100%
GBP/USD Jul 2025 - Sep 2025
0.36
Total Trades 213
Won Trades 212
Lost trades 1
Win Rate 99.53 %
Expected payoff -1.24
Gross Profit 148.40
Gross Loss -413.10
Total Net Profit -264.70
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.27
Total Trades 78
Won Trades 77
Lost trades 1
Win Rate 98.72 %
Expected payoff -1.84
Gross Profit 53.90
Gross Loss -197.30
Total Net Profit -143.40
-100%
-50%
0%
50%
100%
USD/CHF Jul 2025 - Sep 2025
0.27
Total Trades 32
Won Trades 31
Lost trades 1
Win Rate 96.88 %
Expected payoff -2.35
Gross Profit 27.51
Gross Loss -102.58
Total Net Profit -75.07
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.23
Total Trades 66
Won Trades 65
Lost trades 1
Win Rate 98.48 %
Expected payoff -2.30
Gross Profit 45.50
Gross Loss -197.10
Total Net Profit -151.60
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.16
Total Trades 37
Won Trades 36
Lost trades 1
Win Rate 97.30 %
Expected payoff -2.36
Gross Profit 16.45
Gross Loss -103.68
Total Net Profit -87.23
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.14
Total Trades 91
Won Trades 90
Lost trades 1
Win Rate 98.90 %
Expected payoff -3.17
Gross Profit 45.51
Gross Loss -334.20
Total Net Profit -288.69
-100%
-50%
0%
50%
100%
NZD/USD Jan 2025 - Jul 2025
0.06
Total Trades 49
Won Trades 48
Lost trades 1
Win Rate 97.96 %
Expected payoff -11.27
Gross Profit 33.60
Gross Loss -585.70
Total Net Profit -552.10
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.06
Total Trades 22
Won Trades 21
Lost trades 1
Win Rate 95.45 %
Expected payoff -7.46
Gross Profit 10.87
Gross Loss -174.96
Total Net Profit -164.09
-100%
-50%
0%
50%
100%
USD/CAD Jul 2025 - Sep 2025
0.05
Total Trades 17
Won Trades 16
Lost trades 1
Win Rate 94.12 %
Expected payoff -9.80
Gross Profit 8.28
Gross Loss -174.88
Total Net Profit -166.60
-100%
-50%
0%
50%
100%
USD/JPY Jul 2025 - Sep 2025
0.05
Total Trades 40
Won Trades 39
Lost trades 1
Win Rate 97.50 %
Expected payoff -8.50
Gross Profit 19.11
Gross Loss -359.11
Total Net Profit -340.00
-100%
-50%
0%
50%
100%
GBP/CAD Jul 2025 - Sep 2025
0.05
Total Trades 35
Won Trades 34
Lost trades 1
Win Rate 97.14 %
Expected payoff -9.48
Gross Profit 16.99
Gross Loss -348.90
Total Net Profit -331.91
-100%
-50%
0%
50%
100%
GBP/AUD Jan 2025 - Jul 2025
0.04
Total Trades 72
Won Trades 71
Lost trades 1
Win Rate 98.61 %
Expected payoff -11.20
Gross Profit 33.07
Gross Loss -839.73
Total Net Profit -806.66
-100%
-50%
0%
50%
100%
GBP/USD Jan 2025 - Jul 2025
0.04
Total Trades 88
Won Trades 87
Lost trades 1
Win Rate 98.86 %
Expected payoff -17.87
Gross Profit 60.90
Gross Loss -1633.40
Total Net Profit -1572.50
-100%
-50%
0%
50%
100%
USD/JPY Jul 2025 - Sep 2025
0.04
Total Trades 32
Won Trades 31
Lost trades 1
Win Rate 96.88 %
Expected payoff -10.78
Gross Profit 15.19
Gross Loss -360.01
Total Net Profit -344.82
-100%
-50%
0%
50%
100%
GBP/CAD Oct 2024 - Jan 2025
0.03
Total Trades 17
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -18.44
Gross Profit 8.09
Gross Loss -321.54
Total Net Profit -313.45
-100%
-50%
0%
50%
100%
GBP/CAD Jan 2025 - Jul 2025
0.03
Total Trades 45
Won Trades 44
Lost trades 1
Win Rate 97.78 %
Expected payoff -19.17
Gross Profit 22.26
Gross Loss -884.79
Total Net Profit -862.53
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.00
Total Trades 3
Won Trades 2
Lost trades 1
Win Rate 66.67 %
Expected payoff -201.49
Gross Profit 1.04
Gross Loss -605.52
Total Net Profit -604.48
-100%
-50%
0%
50%
100%
AUD/USD Jan 2025 - Jul 2025
0.00
Total Trades 160
Won Trades 159
Lost trades 1
Win Rate 99.38 %
Expected payoff -358.71
Gross Profit 111.30
Gross Loss -57504.60
Total Net Profit -57393.30
-100%
-50%
0%
50%
100%
EUR/USD Jan 2025 - Jul 2025
0.00
Total Trades 83
Won Trades 82
Lost trades 1
Win Rate 98.80 %
Expected payoff -1154.89
Gross Profit 57.40
Gross Loss -95913.00
Total Net Profit -95855.60
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 37
Won Trades 36
Lost trades 1
Win Rate 97.30 %
Expected payoff -2851.80
Gross Profit 25.20
Gross Loss -105541.70
Total Net Profit -105516.50
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.00
Total Trades 44
Won Trades 43
Lost trades 1
Win Rate 97.73 %
Expected payoff -2397.95
Gross Profit 30.10
Gross Loss -105539.90
Total Net Profit -105509.80
-100%
-50%
0%
50%
100%

Comments