Orders Execution
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
6.00
Gross Profit
6.00
Gross Loss
0.00
Total Net Profit
6.00
-100%
-50%
0%
50%
100%
NZD/USD
Oct 2024 - Jan 2025
0.00 %
Total Trades
0
Won Trades
0
Lost trades
0
Win Rate
0.0 %
Expected payoff
0.00
Gross Profit
0.00
Gross Loss
0.00
Total Net Profit
0.00
-100%
-50%
0%
50%
100%
BigP3
#property copyright "@2009 Desynced Tech"
#property link "http://desynced.no-ip.org/fx"
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
datetime lastOrder;
extern int takeProfit = 60;
extern int FastEMA=8;
extern int FFastEMA=7;
extern int FFFastEMA=6;
extern int SlowEMA=17;
extern int SSlowEMA=16;
extern int SSSlowEMA=15;
extern int SignalSMA=9;
extern int SSignalSMA=8;
extern int SSSignalSMA=7;
int ticket ;
double max = 0 ;
int MAGIC = 12;
int orderType ;
int decision () {
double x = iCustom (NULL,0,"ama_slope",0,0); //azzul
if ( x > 0.001 && calculateBuy(0.001 ) ) {
max = x ;
return(1);
}
return(0);
}
bool calculateBuy (double value ) {
int pos = 0;
double vals[14];
int z = 0;
for(int i=1;i<5;i++) {
double x = iCustom (NULL,0,"ama_slope",0,i); //azzul
double y = iCustom (NULL,0,"ama_slope",0,i+1); //azzul
if ( x < y ) return(false);
}
//Print("prob " , pos , " %" , z );
return(true);
}
int init()
{
//----
//----
return(0);
}
void diffs (string str) {
// double vs[14];
for(int i=0;i<14;i++) {
double x = iCustom (NULL,0,"ama_slope",0,i); //azzul
// double y = iCustom (NULL,0,"ama_slople",1,i); //vermelho
// double diff = y -x ;
str = StringConcatenate(str , " , " , x);
}
Print ( str ) ;
}
bool canTrade() {
if ( Minute() == 0 ) return(false);
if ( Hour() >= 1 && Hour() < 2 ) return (false);
if ( Hour() >= 9 && Hour() < 10 ) return (false);
if ( Hour() >= 13 && Hour() < 14 ) return (false);
return (true);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
int decision = decision();
/*
if ( OrdersTotal() > 0 ) {
if ( (TimeCurrent() - lastOrder ) > 60*60*2 && orderType == OP_BUY) {
OrderClose(ticket,0.1,Bid,3,Red);
}
if ( (TimeCurrent() - lastOrder ) > 60*60*2 && orderType == OP_SELL ) {
OrderClose(ticket,0.1,Ask,3,Red);
}
return(0);
}
*/
double lots = 0.1;
//if ( Hour() == 17 || Hour() == 15 ) lots = 0.2;
if ( !canTrade() ) return(0);
if ( decision == 1 && (TimeCurrent() - lastOrder ) > (60*60*3 ) ) {
if ( OrdersTotal() == 0 ) {
//
// Print("buy " , y0 , " " , y1);
// Print("buy ", (x0 - y0)*1000 , " ==>" , l0, " =>", val);
ticket = OrderSend(Symbol(),OP_BUY, lots, Ask, 3,0/* Ask-70*Point*/,Ask+takeProfit*Point,"", MAGIC, 0, Red);
diffs(" buy " );
lastOrder = TimeCurrent();
orderType = OP_BUY;
}
}
else if ( decision == -1 && (TimeCurrent() - lastOrder ) > (60*60*3 ) ) {
if ( OrdersTotal() == 0 ) {
ticket = OrderSend(Symbol(),OP_SELL, lots, Bid, 3, 0/*Bid+70*Point*/,Bid-takeProfit*Point,"", MAGIC, 0, Red);
lastOrder = TimeCurrent();
orderType = OP_SELL;
}
}
//----
//----
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
---