Profit factor:
0.31
Price Data Components
Series array that contains open prices of each barSeries array that contains close prices for each bar
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
Indicators Used
Indicator of the average true range
5 Views
0 Downloads
0 Favorites
CSP!
//+------------------------------------------------------------------+
//|                                                    CSP by Maloma |
//+------------------------------------------------------------------+

#include <stdlib.mqh>
#include <stderror.mqh>

extern double Lots=0.1;
extern int    ATR=15;
extern int    P1=16;
extern int    P2=45;
extern int    P3=19;
extern int    P4=50;
       int    magic=149521;        
       

       double BuyLev;
       double BuyLevTP;
       double BuyLevSL;
       double SelLev;
       double SelLevTP;
       double SelLevSL;
        
bool exist()
{
  bool is=true;
  for (int i=0;i<OrdersTotal();i++)
    {
     OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
     if ((OrderSymbol()==Symbol())&&(OrderMagicNumber()==magic)) {is=false;}
    }
return(is);
}

int OpenOrders()
{
  OrderSend(Symbol(),OP_BUYSTOP,Lots,BuyLev,3,BuyLevSL,BuyLevTP,NULL,magic,0,CLR_NONE);
  OrderSend(Symbol(),OP_SELLSTOP,Lots,SelLev,3,SelLevSL,SelLevTP,NULL,magic,0,CLR_NONE);
  return(0);
}

int start()
{ 
  if ((Hour()==11)&&(Minute()==1)&&exist())
    {
     double B4=iOpen(Symbol(),PERIOD_H1, 1);
     double C4=iClose(Symbol(),PERIOD_H1, 1);
     int D4=MathAbs(iATR(Symbol(),PERIOD_H1,ATR, 1)/Point);
     int I4=MathAbs((B4-C4)/Point);
     if (D4<P1) {double E9=D4*3;} else {E9=D4;}
     if (D4*3>P2) {double F9=P2*Point;} else {F9=D4*3*Point;}
     double G9=E9*Point;
     if (I4>P4)
       {
        BuyLev=G9+C4;
        BuyLevTP=BuyLev+P3*Point;
        BuyLevSL=BuyLev-F9;
        SelLev=C4-G9;
        SelLevTP=SelLev-P3*Point;
        SelLevSL=SelLev+F9;
       }
     else
       {
        double B9=(B4+C4)/2;
        BuyLev=NormalizeDouble((B9+G9),Digits);
        BuyLevTP=BuyLev+P3*Point;
        BuyLevSL=BuyLev-F9;
        SelLev=NormalizeDouble((B9-G9),Digits);
        SelLevTP=SelLev-P3*Point;
        SelLevSL=SelLev+F9;
       }
     OpenOrders();
    }
  return(0);
}

Profitability Reports

GBP/CAD Jul 2025 - Sep 2025
0.00
Total Trades 33
Won Trades 0
Lost trades 33
Win Rate 0.00 %
Expected payoff -3.22
Gross Profit 0.00
Gross Loss -106.10
Total Net Profit -106.10
-100%
-50%
0%
50%
100%
GBP/AUD Jul 2025 - Sep 2025
0.07
Total Trades 15
Won Trades 2
Lost trades 13
Win Rate 13.33 %
Expected payoff -2.37
Gross Profit 2.48
Gross Loss -38.09
Total Net Profit -35.61
-100%
-50%
0%
50%
100%
EUR/USD Jul 2025 - Sep 2025
0.47
Total Trades 59
Won Trades 31
Lost trades 28
Win Rate 52.54 %
Expected payoff -1.14
Gross Profit 58.90
Gross Loss -126.00
Total Net Profit -67.10
-100%
-50%
0%
50%
100%
AUD/USD Jul 2025 - Sep 2025
0.45
Total Trades 33
Won Trades 17
Lost trades 16
Win Rate 51.52 %
Expected payoff -1.20
Gross Profit 32.30
Gross Loss -72.00
Total Net Profit -39.70
-100%
-50%
0%
50%
100%
USD/CAD Oct 2024 - Jan 2025
0.00
Total Trades 1
Won Trades 1
Lost trades 0
Win Rate 100.00 %
Expected payoff 1.40
Gross Profit 1.40
Gross Loss 0.00
Total Net Profit 1.40
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
0.00
Total Trades 1
Won Trades 0
Lost trades 1
Win Rate 0.00 %
Expected payoff -4.50
Gross Profit 0.00
Gross Loss -4.50
Total Net Profit -4.50
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
0.84
Total Trades 3
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -0.23
Gross Profit 3.80
Gross Loss -4.50
Total Net Profit -0.70
-100%
-50%
0%
50%
100%

Comments