|
发表于 14-3-2009 09:09 PM
|
显示全部楼层
原帖由 江百虎 于 14-3-2009 07:26 PM 发表 
把 EA 前面的设定放上来。。。
应该是设定的问题拉。。。
EMA_SR_V2 Trading Period : 12 pm Till 6 Pm
*/
#property copyright "Copyright 2009, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
extern int EMA_Frame = 1;
extern int EMA_Support_Resist = 200;
extern int EMA_Take_Profit = 100;
extern int EMA_Trend_Short = 100;
extern int EMA_Trend_Long = 250;
extern int StopLoss = 5000;
extern int TakeProfit = 5000;
extern int NewStopLoss = 25;
extern string LiveTrading = "yes";
extern string CrossStart = "yes";
extern string ModifyOrder = "no";
extern string L;
extern string CloseOrder = "yes";
extern string CloseEMA = "no";
extern string CrossTrade = "yes";
extern double OrderLot = 0.10;
extern int MaxOrder = 1;
string TakeAction = "none";
string BuyPrevious = "Unknown";
string BuyLatest = "Unknown";
string SellPrevious = "Unknown";
string SellLatest = "Unknown";
string CrossBuyPrevious = "Unknown";
string CrossBuyLatest = "Unknown";
string CrossSellPrevious = "Unknown";
string CrossSellLatest = "Unknown";
int init() // expert initialization function
{
Print("init" ;
return(0);
}
int deinit() // expert deinitialization function
{
Print("deinit" ;
return(0);
}
int OrdersCount()
{
int totalOrders = OrdersTotal();
int count =0;
for(int cnt = 0 ; cnt < totalOrders ; cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol())
count++;
}
return (count);
}
int start() // expert start function
{
Print("" ;
int totalOrders;
Print("Frame = ", EMA_Frame, " *** SR = ", EMA_Support_Resist, " TP = ", EMA_Take_Profit, " *** TS = ", EMA_Trend_Short, " TL = ", EMA_Trend_Long, " *** SL = ", StopLoss, " TP = ", TakeProfit, " NSL = ", NewStopLoss);
Print("LT = ", LiveTrading, " AMD = ", ModifyOrder, " PS = ", LongShort, " CLS = ", CloseOrder, " CLE = ", CloseEMA, " CRT = ", CrossTrade, " *** Lot = ", OrderLot, " MO = ", MaxOrder, " *** OD = ", totalOrders);
double EMA_Take_Profit_Value = iMA(NULL,EMA_Frame,EMA_Take_Profit,0,1,0,0);
double EMA_Support_Resist_Value = iMA(NULL,EMA_Frame,EMA_Support_Resist,0,1,0,0);
double EMA_Trend_Short_Value = iMA(NULL,EMA_Frame,EMA_Trend_Short,0,1,0,0);
double EMA_Trend_Long_Value = iMA(NULL,EMA_Frame,EMA_Trend_Long,0,1,0,0);
double EMA_1_150_Value = iMA(NULL,1,EMA_Trend_Short,0,1,0,0);
double EMA_1_250_Value = iMA(NULL,1,EMA_Trend_Long,0,1,0,0);
int M1_250_Diffrence = (EMA_1_150_Value - EMA_1_250_Value) * 10000;
double EMA_5_150_Value = iMA(NULL,5,EMA_Trend_Short,0,1,0,0);
double EMA_5_250_Value = iMA(NULL,5,EMA_Trend_Long,0,1,0,0);
int M5_250_Diffrence = (EMA_5_150_Value - EMA_5_250_Value) * 10000;
double EMA_15_150_Value = iMA(NULL,15,EMA_Trend_Short,0,1,0,0);
double EMA_15_250_Value = iMA(NULL,15,EMA_Trend_Long,0,1,0,0);
int M15_250_Diffrence = (EMA_15_150_Value - EMA_15_250_Value) * 10000;
double EMA_30_150_Value = iMA(NULL,30,EMA_Trend_Short,0,1,0,0);
double EMA_30_250_Value = iMA(NULL,30,EMA_Trend_Long,0,1,0,0);
int M30_250_Diffrence = (EMA_30_150_Value - EMA_30_250_Value) * 10000;
double EMA_H1_150_Value = iMA(NULL,60,EMA_Trend_Short,0,1,0,0);
double EMA_H1_250_Value = iMA(NULL,60,EMA_Trend_Long,0,1,0,0);
int H1_250_Diffrence = (EMA_H1_150_Value - EMA_H1_250_Value) * 10000;
double EMA_H4_150_Value = iMA(NULL,240,EMA_Trend_Short,0,1,0,0);
double EMA_H4_250_Value = iMA(NULL,240,EMA_Trend_Long,0,1,0,0);
int H4_250_Diffrence = (EMA_H4_150_Value - EMA_H4_250_Value) * 10000;
double EMA_D1_150_Value = iMA(NULL,1440,EMA_Trend_Short,0,1,0,0);
double EMA_D1_250_Value = iMA(NULL,1440,EMA_Trend_Long,0,1,0,0);
int D1_250_Diffrence = (EMA_D1_150_Value - EMA_D1_250_Value) * 10000;
double Weeks_Diffrence = EMA_Trend_Short_Value - EMA_Trend_Long_Value;
帮我看看 哪里出问题了。。。 |
|