原帖由 镑美ATM 于 26-8-2009 06:09 PM 发表 
新手小户操盘护单必要
当单子进入市场后,如果盘面获利超过30点后,就务必将止损前移到进场价前,不管行情后市怎样走,我们的本金都不会受到威胁,就算后市震荡回调.变盘,我们都不怕,最多单子白 ...
获利 30 点后自动将止损前移到进场价前 5 点的 ea 。。。
用 H4 的 RSI 来决定什么时候可以开始买卖。。。
用 M5 的 ema 和 RSI 来决定比较精确的布局时机。。。
就是这样简单啦。。。通常从开始布局 2 到 3 天之后都可以至少赚 100 点。。。
  
~~~~~~~~~~~~~~~~~~~~~~~~
//+------------------------------------------------------------------+
//| Sound_Only.mq4 |
//| Copyright ?2009, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright 2009, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
double ProtectPips = 0.0030;
double TakeProfitPips = 0.0005;
int Frame_SR = 0;
int EMA_SR = 250;
double LeftSeconds = 0.0;
string PrintDetails = "no";
string SoundText = "none";
string OrderProtected = "no";
string EMA_Status = "none";
int cnt = 0;
int count = 0;
int init()
{
Print("init" ;
return(0);
}
int deinit()
{
Print("deinit" ;
return(0);
}
int start()
{
Print("" ;
double TotalPips = 0.0;
double StopProfitLoss = 0.0;
double TakeProfitLoss = 0.0;
double ProfitLoss = 0.0;
cnt = 0;
count = 0;
int cntBuy = 0;
int cntSell = 0;
int cntUnprotected = 0;
double StopLossNewValueBuy = 0.00;
for(cnt = 0 ; cnt < OrdersTotal() ; cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol())
if(OrderType() == 0)
{
TotalPips = TotalPips + (Bid - OrderOpenPrice());
StopProfitLoss = OrderStopLoss() - OrderOpenPrice();
TakeProfitLoss = OrderTakeProfit() - OrderOpenPrice();
ProfitLoss = Bid - OrderOpenPrice();
cntBuy++;
if(Bid - OrderOpenPrice() > ProtectPips && OrderStopLoss() == 0.0000)
{
StopLossNewValueBuy = OrderOpenPrice() + TakeProfitPips;
OrderModify(OrderTicket(),OrderOpenPrice(),StopLossNewValueBuy,OrderTakeProfit(),0,Blue);
OrderProtected = "yes";
}
if(OrderStopLoss() == 0.0000 || OrderStopLoss() - OrderOpenPrice() < 0)
{
cntUnprotected++;
}
}
if(OrderType() == 1)
{
TotalPips = TotalPips + (OrderOpenPrice() - Ask);
StopProfitLoss = OrderOpenPrice() - OrderStopLoss();
TakeProfitLoss = OrderOpenPrice() - OrderTakeProfit();
ProfitLoss = OrderOpenPrice() - Ask;
cntSell++;
if(OrderOpenPrice() - Ask > ProtectPips && OrderStopLoss() == 0.0000)
{
StopLossNewValueBuy = OrderOpenPrice() - TakeProfitPips;
OrderModify(OrderTicket(),OrderOpenPrice(),StopLossNewValueBuy,OrderTakeProfit(),0,Blue);
OrderProtected = "yes";
}
if(OrderStopLoss() == 0.0000 || OrderOpenPrice() - OrderStopLoss() < 0)
{
cntUnprotected++;
}
}
if(OrdersTotal() - cnt < 2)
{
LeftSeconds = TimeCurrent() - OrderOpenTime();
}
if(PrintDetails == "yes"
{
Print("OT = ", OrderTicket(), " ", TimeToStr(OrderOpenTime()), " TY = ", OrderType(), " LT = ", OrderLots(), " OP = ", OrderOpenPrice(), " SP = ", StopProfitLoss, " PL = ", ProfitLoss);
}
count++;
}
Print("Frame = ", Frame_SR, " EMA = ", EMA_SR);
double EMA_SR_150_Value = iMA(NULL,Frame_SR,150,0,1,0,0);
double EMA_SR_250_Value = iMA(NULL,Frame_SR,250,0,1,0,0);
double EMA_SR_Value = iMA(NULL,Frame_SR,EMA_SR,0,1,0,0);
double RSI_SR = iRSI(NULL,Frame_SR,14,PRICE_CLOSE,0);
// news stops expert ok alert tick starwars robocop wmpaud4 wmpaud2 bugsbunny2 daffyduck2
if(OrderProtected == "yes"
{
SoundText = "Order Protect";
OrderProtected = "no";
PlaySound("Love_of_Siam_Gun_lae_gun.wav" ;
}else{
if(RSI_SR > 70)
{
SoundText = "Over Bought";
PlaySound("starwars.wav" ;
}else{
if(RSI_SR >65 && RSI_SR <= 70)
{
SoundText = "UP +++";
PlaySound("news.wav" ;
}else{
if(RSI_SR >60 && RSI_SR <= 65)
{
SoundText = "UP ---";
PlaySound("expert.wav" ;
}else{
if(RSI_SR >=35 && RSI_SR < 40)
{
SoundText = "DOWN ---";
PlaySound("ok.wav" ;
}else{
if(RSI_SR >= 30 && RSI_SR < 35)
{
SoundText = "DOWN +++";
PlaySound("stops.wav" ;
}else{
if(RSI_SR < 30)
{
SoundText = "Over Sold";
PlaySound("robocop.wav" ;
}else{
if(EMA_SR_150_Value > EMA_SR_250_Value){
SoundText = "Up Trend";
PlaySound("alert.wav" ;
}else{
SoundText = "Down Trend";
PlaySound("tick.wav" ;
}
}
}
}
}
}
}
}
double SpreadDiffrence = Bid - Ask;
Print("Spread = ", DoubleToStr(SpreadDiffrence,4), " TotalOrders = ", OrdersTotal(), " Buy = ", cntBuy, " Sell = ", cntSell, " Unprotected = ", cntUnprotected, " TotalPips = ", DoubleToStr(TotalPips,4), " ***" ;
if(EMA_SR_150_Value > EMA_SR_250_Value){
EMA_Status = "BUY";
}else{
EMA_Status = "SELL";
}
Comment("UP = ", cntUnprotected, " OT = ", OrdersTotal(), " PP = ", DoubleToStr(ProtectPips,4), " TP = ", DoubleToStr(TakeProfitPips,4), " ACT = ", EMA_Status, " ST = ", SoundText, " LM = ", DoubleToStr(LeftSeconds/60,2), " SP = ", DoubleToStr(Bid - Ask,4), " Bid = ", DoubleToStr(Bid - EMA_SR_250_Value,4));
return(0);
}
|