Orders Execution
Indicators Used
0
Views
0
Downloads
0
Favorites
Profitability Reports
GBP/USD
Oct 2024 - Jan 2025
0.00 %
Total Trades
1
Won Trades
0
Lost trades
0
Win Rate
0.00 %
Expected payoff
424.20
Gross Profit
424.20
Gross Loss
0.00
Total Net Profit
424.20
-100%
-50%
0%
50%
100%
NZD/USD
Oct 2024 - Jan 2025
0.00 %
Total Trades
1
Won Trades
1
Lost trades
0
Win Rate
1.00 %
Expected payoff
309.80
Gross Profit
309.80
Gross Loss
0.00
Total Net Profit
309.80
-100%
-50%
0%
50%
100%
CCI_TRADER
//+------------------------------------------------------------------+
//| CCI_TRADER.mq4 |
//| Copyright © 2009, Victor Chebotariov |
//+----[ ICQ ]-------------------------------------------------------+
//| 342-574-15 |
//+----[ Phone ]-----------------------------------------------------+
//| +380958965042 |
//| +380652707069 |
//| +380443609960 |
//+----[ Web ]-------------------------------------------------------+
//| http://chebotariov.com |
//| http://chebotariov.co.ua |
//| http://amero.com.ua |
//| http://amero.co.ua |
//| http://investmoney.kiev.ua |
//| http://riskinvest.kiev.ua |
//| http://tetrabourse.com.ua |
//| http://tb-unitrade.com.ua |
//| http://i-contact.kiev.ua |
//| http://srubidom.com |
//+----[ E-mail ]----------------------------------------------------+
//| victor@chebotariov.co.ua |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, Victor Chebotariov"
#property link "http://www.chebotariov.com"
#define magic 1052009
//---- input parameters
extern int period=720;
//+------------------------------------------------------------------+
//| CCI_TRADER expert start function |
//+------------------------------------------------------------------+
int start()
{
//----
double val = iCCI(NULL ,0,period,PRICE_TYPICAL,0);
int ticket, cnt, total=OrdersTotal();
if(total<1)
{
if(val>100)
{
ticket=OrderSend(Symbol(),OP_BUY,0.1,Ask,3,0,0,"CCI_TRADER",magic,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else
{
Print("Error opening BUY order : ",GetLastError());
return(0);
}
}
else if(val<-100)
{
ticket=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,"CCI_TRADER",magic,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELL order opened : ",OrderOpenPrice());
}
else
{
Print("Error opening SELL order : ",GetLastError());
return(0);
}
}
}
for(cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if(OrderType()<=OP_SELL && // check for opened position
OrderSymbol()==Symbol()) // check for symbol
{
if(OrderType()==OP_BUY) // long position is opened
{
// should it be closed?
if(val<-100)
{
OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); // close position
return(0); // exit
}
}
else // go to short position
{
// should it be closed?
if(val>100)
{
OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet); // close position
return(0); // exit
}
}
}
}
//----
return(0);
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---