ControlPoints

Author: Joke by primajaya
Price Data Components
Series array that contains open prices of each bar
Orders Execution
Checks for the total of open ordersIt automatically opens orders when conditions are reached
0 Views
0 Downloads
0 Favorites

Profitability Reports

GBP/USD Oct 2024 - Jan 2025
57.00 %
Total Trades 1745
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -5.45
Gross Profit 12590.00
Gross Loss -22095.00
Total Net Profit -9505.00
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
20.00 %
Total Trades 839
Won Trades 88
Lost trades 751
Win Rate 0.10 %
Expected payoff -11.33
Gross Profit 2370.00
Gross Loss -11875.00
Total Net Profit -9505.00
-100%
-50%
0%
50%
100%
ControlPoints
//+------------------------------------------------------------------+
//|                                                ControlPoints.mq4 |
//|                                                                  |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Joke by primajaya"
#property link      "Control Points is a Joke"

extern int TP = 100;
extern int SL = 50; 

#define magic 8888 // very lucky right?
#define risk 10 // 10% enough

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----
double op = iOpen(Symbol(),1440,0);
double lot = NormalizeDouble(AccountEquity()*risk/100000,1);

if(OrdersTotal()<1)
{
   if(Ask<op) OrderSend(Symbol(),OP_BUY,lot,Ask,2,Ask-SL*Point,Ask+TP*Point,"Control Points",magic,0,Red);
   if(Bid>op) OrderSend(Symbol(),OP_SELL,lot,Bid,2,Bid+SL*Point,Bid-TP*Point,"Control Points",magic,0,Blue); 
}

//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---