Author: Copyright � 2006, maloma
Orders Execution
It automatically opens orders when conditions are reachedIt Closes Orders by itself Checks for the total of open orders
0 Views
0 Downloads
0 Favorites

Profitability Reports

AUD/USD Oct 2024 - Jan 2025
34.00 %
Total Trades 342
Won Trades 0
Lost trades 0
Win Rate 0.00 %
Expected payoff -2.49
Gross Profit 430.00
Gross Loss -1280.00
Total Net Profit -850.00
-100%
-50%
0%
50%
100%
GBP/USD Oct 2024 - Jan 2025
63.00 %
Total Trades 604
Won Trades 234
Lost trades 370
Win Rate 0.39 %
Expected payoff -1.13
Gross Profit 1170.00
Gross Loss -1850.00
Total Net Profit -680.00
-100%
-50%
0%
50%
100%
NZD/USD Oct 2024 - Jan 2025
18.00 %
Total Trades 520
Won Trades 80
Lost trades 440
Win Rate 0.15 %
Expected payoff -3.46
Gross Profit 400.00
Gross Loss -2200.00
Total Net Profit -1800.00
-100%
-50%
0%
50%
100%
e-BTT
#property copyright "Copyright © 2006, maloma"
#property  link     "ICQ 16-292-050"

extern double Lots       = 0.1;
extern int    StopLoss   = 50;
extern int    TakeProfit = 50;

extern int magic=965656;

int    TTFbars=15; //15=default number of bars for computation.
int    t3_period=5;
double b=0.7;
int    ppor=50;
int    mpor=-50;
int    barBegin=1000; //<1000 recommended for faster speed, 0=All bars computed & plotted.

bool   BSig=false, SSig=false;

void CheckSig()
{
 int T=iCustom(Symbol(),0,"BtTrendTrigger-T",TTFbars,t3_period,b,ppor,mpor,barBegin,1,0);
 double S0=iCustom(Symbol(),0,"BtTrendTrigger-T",TTFbars,t3_period,b,ppor,mpor,barBegin,0,0);
 double S1=iCustom(Symbol(),0,"BtTrendTrigger-T",TTFbars,t3_period,b,ppor,mpor,barBegin,0,1);
 if (T==50 && S0>50 && S1<50) {BSig=true;} else {BSig=false;}
 if (T==-50 && S0<-50 && S1>-50) {SSig=true;} else {SSig=false;}
 return(0);
}

void OpenOrders()
{
 if (BSig) OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Ask-StopLoss*Point,Ask+TakeProfit*Point,"e-BTT",magic,0,Green);
 if (SSig) OrderSend(Symbol(),OP_SELL,Lots,Bid,3,Bid+StopLoss*Point,Bid-TakeProfit*Point,"e-BTT",magic,0,Yellow);
 return(0);
}

void CloseOrders()
{
 OrderSelect(0,SELECT_BY_POS,MODE_TRADES);
 if (OrderType()==OP_BUY && SSig) OrderClose(OrderTicket(),OrderLots(),Bid,3,Green);
 if (OrderType()==OP_SELL && BSig) OrderClose(OrderTicket(),OrderLots(),Ask,3,Yellow);
 return(0);
}

int start()
{
 CheckSig();
 if (OrdersTotal()==1) CloseOrders();
 if (OrdersTotal()==0) OpenOrders();
 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 ---