//+------------------------------------------------------------------+
//| mo_bidir_v0_1.mq4 |
//| |
//| - Works best in 5M timeframe |
//| - Bug fix to stop_loss in line 22 2010.04.07 |
//+------------------------------------------------------------------+
#property copyright "趋势之王-EA-QQ:2627522988"
#define MAGIC 1234
#define IDENT "趋势之王QQ:2627522988"
extern double lots = 1;
extern double stop_loss = 80; // (8 pips) optimise 50-2000
extern double take_profit = 320; // (75 pips) optimise 50-2000
int last_bar = 0;
void deinit() {
Comment("www.125808047.com");
}
int start(){
if (last_bar == Bars) return(0);
last_bar = Bars;
if (OrdersTotal() == 0){
bool cg = OrderSend(Symbol(), OP_BUY, lots ,Ask, 3, Ask - stop_loss * Point, Bid + take_profit * Point, IDENT, MAGIC, 0, Blue);
cg = OrderSend(Symbol(), OP_SELL, lots ,Bid, 3, Bid + stop_loss * Point, Ask - take_profit * Point, IDENT, MAGIC, 0, Red);
}
return(0);
}
这个牛!!! |