顺水外汇EA交易网MT4
标题:
在震荡行情用可以翻倍的马丁,
[打印本页]
作者:
庄名扬
时间:
2016-8-5 15:03
楼主在哪里找到的EA?还是自己写的?
作者:
爱我什么
时间:
2016-8-5 15:14
标题:
在震荡行情用可以翻倍的马丁,
测试过在震荡行情可以直接翻倍的马丁,大家可以直接修改使用
作者:
qq502310773
时间:
2016-8-5 15:40
V共和国那挺好研讨会
作者:
davicyap
时间:
2016-8-5 16:19
谢谢分享
作者:
jiajie
时间:
2016-8-5 16:19
谁来帮忙解读一下策略进出原则,我看到有点头胀。
This line is for some reason very important. you'd better settle all your account at the end of day.*****
/*if (TimeHour(CurTime())==23 && MathAbs(faMiddle-faHighest)MathAbs(faMiddle-faLowest) )
{
CloseSellPositions();
return(0);
}
*/
//System Stoploss based on LongTerm Moving Average (Fibo 55 day MA)
//StopLoss For Buy Positions (Optional)
if ((maLongCurrent>closeCurrentD) && (maLongPreviousclosePreviousD))
{
CloseSellPositions();
return(0);
}
// Check for invalid bars and takeprofit
if(Bars 0)
realSL = Ask - stopLoss * Point;
if(takeProfit > 0)
realTP = Ask + takeProfit * Point;
ticket = OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,realSL,realTP,nameEA+" - Magic: "+magicEA+" ",magicEA,0,Red); // Buy
if(ticket " + ErrorDescription(GetLastError()));
}
else
{
}
}
if(isSelling && !isBuying && !isBuyClosing && !isSellClosing)
{ // Check for SELL entry signal
if(stopLoss > 0)
realSL = Bid + stopLoss * Point;
if(takeProfit > 0)
realTP = Bid - takeProfit * Point;
ticket = OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,realSL,realTP,nameEA+" - Magic: "+magicEA+" ",magicEA,0,Red); // Sell
if(ticket " + ErrorDescription(GetLastError()));
}
else
{
}
}
return(0);
*/
calculateIndicators(); // Calculate indicators' value
//Check for TakeProfit Conditions
if(lTakeProfitfaMA1 && faBandWidthfaMA1))
{
OpenBuy();
//if (OrdersTotal()==1 && (faClose2faMA1)) {OpenBuy();}
//if (OrdersTotal()==2 && (faClose0>faMA1)) {OpenBuy();}
//if (OrdersTotal()==3 && (faClose0>faMA1)) {OpenBuy();}
return(0);
}
//Close Buy Condition
/* if ((faClose2300) && (sarCurrent600) && (sarCurrent900) && (sarCurrent1200) && (sarCurrent1500) && (sarCurrent1800) && (sarCurrent2100) && (sarCurrent2400) && (sarCurrent2700) && (sarCurrent3000) && (sarCurrent3300) && (sarCurrent3600) && (sarCurrent3900) && (sarCurrent4200) && (sarCurrent4500) && (sarCurrent4800) && (sarCurrent5100) && (sarCurrent5400) && (sarCurrent5700) && (sarCurrentcloseCurrent)
{
if ((CurTime()-OrderOpenTime()>300) && (sarCurrent>highCurrent)) {j=1;}
if ((CurTime()-OrderOpenTime()>600) && (sarCurrent>highCurrent)) {j=2;}
if ((CurTime()-OrderOpenTime()>900) && (sarCurrent>highCurrent)) {j=3;}
if ((CurTime()-OrderOpenTime()>1200) && (sarCurrent>highCurrent)) {j=4;}
if ((CurTime()-OrderOpenTime()>1500) && (sarCurrent>highCurrent)) {j=5;}
if ((CurTime()-OrderOpenTime()>1800) && (sarCurrent>highCurrent)) {j=6;}
if ((CurTime()-OrderOpenTime()>2100) && (sarCurrent>highCurrent)) {j=7;}
if ((CurTime()-OrderOpenTime()>2400) && (sarCurrent>highCurrent)) {j=8;}
if ((CurTime()-OrderOpenTime()>2700) && (sarCurrent>highCurrent)) {j=9;}
if ((CurTime()-OrderOpenTime()>3000) && (sarCurrent>highCurrent)) {j=10;}
if ((CurTime()-OrderOpenTime()>3300) && (sarCurrent>highCurrent)) {j=11;}
if ((CurTime()-OrderOpenTime()>3600) && (sarCurrent>highCurrent)) {j=12;}
if ((CurTime()-OrderOpenTime()>3900) && (sarCurrent>highCurrent)) {j=13;}
if ((CurTime()-OrderOpenTime()>4200) && (sarCurrent>highCurrent)) {j=14;}
if ((CurTime()-OrderOpenTime()>4500) && (sarCurrent>highCurrent)) {j=15;}
if ((CurTime()-OrderOpenTime()>4800) && (sarCurrent>highCurrent)) {j=16;}
if ((CurTime()-OrderOpenTime()>5100) && (sarCurrent>highCurrent)) {j=17;}
if ((CurTime()-OrderOpenTime()>5400) && (sarCurrent>highCurrent)) {j=18;}
if ((CurTime()-OrderOpenTime()>5700) && (sarCurrent>highCurrent)) {j=19;}
for(int i=j; itrailingStop*Point)
{
if (OrderStopLoss()[B]trailingStop*Point)
{
if (OrderStopLoss()>Ask+trailingStop*Point ||
OrderStopLoss()==0)
ModifyStopLoss(Ask+trailingStop*Point);
}
}
}
}
}
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void ModifyStopLoss(double ldStopLoss)
{
bool fm;
fm=OrderModify(OrderTicket(),OrderOpenPrice
(),ldStopLoss,OrderTakeProfit(),0,CLR_NONE);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OpenBuy()
{
double ldLot, ldStop, ldTake;
string lsComm;
ldLot=GetSizeLot();
ldStop=0;
ldTake=GetTakeProfitBuy();
lsComm=GetCommentForOrder();
OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,ldStop,ldTake,nameEA,magicEA,0,clOpenBuy);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OpenSell()
{
double ldLot, ldStop, ldTake;
string lsComm;
//----
ldLot=GetSizeLot();
ldStop=0;
ldTake=GetTakeProfitSell();
lsComm=GetCommentForOrder();
OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,ldStop,ldTake,nameEA,magicEA,0,clOpenSell);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
string GetCommentForOrder() { return(nameEA); }
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
double GetSizeLot() { return(Lots); }
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
double GetTakeProfitBuy() { return(Ask+lTakeProfit*Point); }
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
double GetTakeProfitSell() { return(Bid-sTakeProfit*Point); }
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void calculateIndicators()
{
// Calculate indicators' value
macdHistCurrent =iMACD(NULL,0,12,26,9,PRICE_OPEN,MODE_MAIN,0);
macdHistPrevious =iMACD(NULL,0,12,26,9,PRICE_OPEN,MODE_MAIN,1);
macdSignalCurrent =iMACD(NULL,0,12,26,9,PRICE_OPEN,MODE_SIGNAL,0);
macdSignalPrevious =iMACD(NULL,0,12,26,9,PRICE_OPEN,MODE_SIGNAL,1);
stochHistCurrent =iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,0);
stochHistPrevious =iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_MAIN,1);
stochSignalCurrent =iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,0);
stochSignalPrevious=iStochastic(NULL,0,5,3,3,MODE_SMA,0,MODE_SIGNAL,1);
sarCurrent =iSAR(NULL,0,0.009,0.2,0); // Parabolic Sar Current
sarPrevious =iSAR(NULL,0,0.009,0.2,1); //Parabolic Sar Previous
momCurrent =iMomentum(NULL,0,14,PRICE_OPEN,0); // Momentum Current
momPrevious =iMomentum(NULL,0,14,PRICE_OPEN,1); // Momentum Previous
highCurrent =iHigh(NULL,0,0); //High price Current
lowCurrent =iLow(NULL,0,0); //Low Price Current
closeCurrent =iClose(NULL,PERIOD_H4,0); //Close Price Current for H4 TimeFrame
closeCurrentD =iClose(NULL,PERIOD_D1,0); //Close Price Current for D1 TimeFrame
closePreviousD =iClose(NULL,PERIOD_D1,1); //Close Price Previous for D1 TimeFrame
maLongCurrent =iMA(NULL,PERIOD_D1,55,1,MODE_SMMA,PRICE_TYPICAL,0); //Current Long Term Moving Average
maLongPrevious =iMA(NULL,PERIOD_D1,55,1,MODE_SMMA,PRICE_TYPICAL,1); //Previous Long Term Moving Average
maShortCurrent =iMA(NULL,0,2,1,MODE_SMMA,PRICE_TYPICAL,0); //Current Short Term Moving Average
maShortPrevious =iMA(NULL,0,2,1,MODE_SMMA,PRICE_TYPICAL,1); //Previous Long Term Moving Average
faRSICurrent =iRSI(NULL,0,14,PRICE_TYPICAL,0); //Current RSI
// Check for BUY, SELL, and CLOSE signal
isBuying =false;
isSelling=false;
isBuyClosing=false;
isSellClosing=false;
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void CloseBuyPositions()
{
for(int i=0; i<OrdersTotal(); i++)
{
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderSymbol()==Symbol() && OrderMagicNumber()==magicEA)
{
if (OrderType()==OP_BUY) OrderClose(OrderTicket(),Lots,Bid,Slippage);
}
}
}
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void CloseSellPositions()
{
for(int i=0; i<OrdersTotal(); i++)
{
if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES))
{
if (OrderSymbol()==Symbol() && OrderMagicNumber()==magicEA)
{
if (OrderType()==OP_SELL) OrderClose(OrderTicket(),Lots,Ask,Slippage
作者:
此用户不存在
时间:
2016-8-5 16:32
楼主能补个图吗
作者:
cxzscr
时间:
2016-8-5 19:38
888888888888888888
作者:
落雨
时间:
2016-8-5 20:21
无图无真相!!!无实盘数据无真相!!!无说明无真相!!!祝你爆仓愉快~~~
作者:
49044000
时间:
2016-8-5 22:32
你好,请说明一下如何调整参数及使用,多谢。
作者:
1032332476
时间:
2016-8-5 22:32
回复看看
作者:
1972wag
时间:
2016-8-6 01:51
你好,请说明一下如何调整参数及使用,多谢。
作者:
simple000
时间:
2016-8-6 08:52
谢谢分享
作者:
daniver
时间:
2016-8-6 11:47
关键你怎么把握震荡行情,要是预先知道那是震荡行情,还用什么EA.手动做单不照样翻倍
作者:
vampyre
时间:
2016-8-7 18:59
谢谢楼主分享
作者:
cysd
时间:
2016-8-7 21:20
学习学习
欢迎光临 顺水外汇EA交易网MT4 (http://waterforex.com/)
Powered by Discuz! X3.2