我将免费撰写一份顾问报告 - 页 157 1...150151152153154155156157158159160161162163164...171 新评论 Александр 2021.09.22 10:42 #1561 Ivan Butko #: 不幸的是,之前的那个并不适合。我翻阅了代码库, 几乎找到了我需要的东西https://www.mql5.com/ru/code/10236 //+------------------------------------------------------------------+//| i`lbeback.mq4 |//| Copyright ? 2011, AM2 && Tiburond |//| http://www.forexsystems.biz |//+------------------------------------------------------------------+#property copyright "Copyright ? 2011, AM2 && Tiburond"#property link "http://www.forexsystems.biz"#define MAGIC 20110406extern int StopLoss = 1300; //???????? ??????extern int StartHour = 21; //??? ?????? ????????(???????????? ?????)extern int Distance = 250; //?????????? ?? ???? ??? ????????? ??????extern int Step = 50; //??? ????????? ???????extern int Count = 4; //?????????? ??????????????? ???????extern int Expiration = 4; //????? ????????? ??????extern double Lots = 1; //???extern bool MM = true; //?????????? ???????????????extern double TSP = 5; //????extern bool BU = true; //?????????? ?????? ??????? ? ????????? ? ??????? ???extern int BUHour = 2; //??? ????? ??????? ??????? ??????? ? ?????????//+------------------------------------------------------------------+//| expert initialization function |//+------------------------------------------------------------------+int init() {//---- //---- return(0); }//+------------------------------------------------------------------+//| expert deinitialization function |//+------------------------------------------------------------------+int deinit() {//---- //---- return(0); }//+------------------------------------------------------------------+//| expert start function |//+------------------------------------------------------------------+int start() { int b=0,s=0,res; datetime expiration = TimeCurrent()+3600*Expiration; double BuyPrice=fND(Open[0]-Distance*Point); double SellPrice=fND(Open[0]+Distance*Point); for (int i=OrdersTotal()-1;i>=0;i--) { if (OrderSelect(i, SELECT_BY_POS)) { if (OrderSymbol()!=Symbol() || OrderMagicNumber()!=MAGIC) continue; if (OrderType()==OP_BUYLIMIT) b++; if (OrderType()==OP_SELLLIMIT) s++; } } if (Hour()>BUHour && Hour()<StartHour && AllProfit()>0) ClosePositions(); if (Hour()>BUHour && DayOfWeek() == 5) ClosePositions(); if (Hour()==StartHour && b<1 && DayOfWeek() != 5) for(i=1;i<=Count;i++) { { res=OrderSend(Symbol(),OP_BUYLIMIT,fLots(),fND(Ask-(Distance*Point+i*Step*Point)),3,fND(BuyPrice-StopLoss*Point),fND(Open[0]),"",MAGIC,expiration,Blue); Sleep(3000); if(res<0) { Print("??????: ",GetLastError()); } else { RefreshRates(); } } } if (Hour()==StartHour && s<1 && DayOfWeek() != 5) for(i=1;i<=Count;i++) { { res=OrderSend(Symbol(),OP_SELLLIMIT,fLots(),fND(Bid+(Distance*Point+i*Step*Point)),3,fND(SellPrice+StopLoss*Point),fND(Open[0]),"",MAGIC,expiration,Red ); Sleep(3000); if(res<0) { Print("??????: ",GetLastError()); } else { RefreshRates(); } } } //---- return(0); }//+------------------------------------------------------------------+double fND(double d, int n=-1) { if (n<0) return(NormalizeDouble(d, Digits)); return(NormalizeDouble(d, n)); }//+------------------------------------------------------------------+double fLots() { double lot=Lots; double lot_min =MarketInfo( Symbol(), MODE_MINLOT ); double lot_max =MarketInfo( Symbol(), MODE_MAXLOT ); if (MM) { double lot_step =MarketInfo( Symbol(), MODE_LOTSTEP ); double lotcost =MarketInfo( Symbol(), MODE_TICKVALUE ); double dollarsPerPip=0.0; lot = AccountFreeMargin()*TSP/100.0; dollarsPerPip=lot/StopLoss; lot=fND(dollarsPerPip/lotcost, 2); lot=fND(lot/lot_step, 0) * lot_step; } if (lot<lot_min) lot=lot_min; if (lot>lot_max) lot=lot_max; return(lot); }//+------------------------------------------------------------------+void ClosePositions() { if(BU) for (int i=OrdersTotal()-1;i>=0;i--) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() == Symbol()) { if (OrderSymbol() == Symbol() && OrderMagicNumber() == MAGIC) { if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, 3, Blue); if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, 3, Red); } Sleep(1000); } } }//+------------------------------------------------------------------+double AllProfit() { double Profit = 0; for (int i=OrdersTotal()-1;i>=0;i--) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if (OrderSymbol() != Symbol() || OrderMagicNumber() != MAGIC) continue; if (OrderSymbol() == Symbol() && OrderMagicNumber() == MAGIC) if (OrderType() == OP_BUY || OrderType() == OP_SELL) Profit += OrderProfit(); } return (Profit); }//+------------------------------------------------------------------+ 请帮助我进行更正。该EA不会强行关闭未结订单。我希望在设置限额的同时,我们也能设置其强制关闭的时间。 我们需要TP和trall来优化它们。一个trall,这样所有的限制都会以一种小的方式关闭,但收集夜间的噪音。 引入了订单删除、计时、设置止损和拖网(取自这里https://www.mql5.com/ru/code/32662, 那里的解释相同)。 Trailing 2SL www.mql5.com Трал с двумя уровнями стопа. И с установкой ТП 附加的文件: Limit.mq4 25 kb Анна Калмыкова 2021.09.22 18:05 #1562 如何查出身份 [删除] 2021.09.22 18:39 #1563 Анна Калмыкова #: 你怎样才能知道你的身份呢? 什么的身份? poloskun Мараховский 2021.09.22 19:49 #1564 如何取钱。 [删除] 2021.09.22 21:47 #1565 从哪里取下来? Sergei Zhukov 2021.09.26 14:24 #1566 帮我写一个EA 交易机器人。第一批买入0.01或更少。如果拿了两个点,就会被关闭,再次买入0.01两个点。如果不是,那么手数总是翻倍,根据每点的交易规则,卖出0.02的两点或三点,走势相反。如果没有采取,买入0.04并关闭,如果没有采取0.08,以此类推,最多八次,即最多0.128手。我们总是改变方向。如果采取了,又是0,01。*** Lydvik-kaskad 2021.10.03 09:11 #1567 你写EA是为了收费,而且不在论坛上讨论? Vladimir Karputov 2021.10.03 09:14 #1568 Lydvik-kaskad #: 你写EA是为了收费,而且不在论坛上讨论? 有偿写作服务自由职业者。遵循该链接并阅读参考资料。 Торговые приложения для MetaTrader 5 на заказ 2021.10.02www.mql5.com Самый большой фриланс c разработчиками программ на MQL5 var58 2021.10.05 10:18 #1569 你好,请帮助。 我需要一个能在图表上寻找并显示截图中情况的EA。 计算中使用了正常SAR抛物线和正常线性回归通道。 该指标显示了过去1000个柱子所搜索到的情况。 抛物线的下降波 该指标计算抛物线变化后的参数。 为了计算,我们取抛物线的两个波段彼此相继。 在这种情况下,下降波(价格上方的点)。 1)每个波段都有最低点,波段1有A点,波段2有B点。 2)B点的水平必须高于A点的水平。 3) 这些点由一个回归通道连接,该通道应朝下--这就是 所需的形成。 抛物线型上升波 该指标计算抛物线变化后的参数。 为了计算,我们采取了两个抛物线相继的波。 在这种情况下,上升波(价格下的点)。 1)取每个波段的最高点,波段1有A点,波段2有B点。 2)B点的水平必须低于A点的水平。 3) 这些点由一个回归通道连接,通道必须是向上的--这就是 所需的形成。 我将非常感激。我可以分享这些条目。 附加的文件: yxc3e4dpz2.png 64 kb 4cprtquce6.png 62 kb [删除] 2021.10.05 10:46 #1570 var58 #: 我将非常感激。我可以分享投入。 为什么要取笑ParabolicSAR--它完美地显示了输入和输出,因为它是。 1...150151152153154155156157158159160161162163164...171 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
不幸的是,之前的那个并不适合。我翻阅了代码库, 几乎找到了我需要的东西
https://www.mql5.com/ru/code/10236
//+------------------------------------------------------------------+
//| i`lbeback.mq4 |
//| Copyright ? 2011, AM2 && Tiburond |
//| http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright ? 2011, AM2 && Tiburond"
#property link "http://www.forexsystems.biz"
#define MAGIC 20110406
extern int StopLoss = 1300; //???????? ??????
extern int StartHour = 21; //??? ?????? ????????(???????????? ?????)
extern int Distance = 250; //?????????? ?? ???? ??? ????????? ??????
extern int Step = 50; //??? ????????? ???????
extern int Count = 4; //?????????? ??????????????? ???????
extern int Expiration = 4; //????? ????????? ??????
extern double Lots = 1; //???
extern bool MM = true; //?????????? ???????????????
extern double TSP = 5; //????
extern bool BU = true; //?????????? ?????? ??????? ? ????????? ? ??????? ???
extern int BUHour = 2; //??? ????? ??????? ??????? ??????? ? ?????????
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
int b=0,s=0,res;
datetime expiration = TimeCurrent()+3600*Expiration;
double BuyPrice=fND(Open[0]-Distance*Point);
double SellPrice=fND(Open[0]+Distance*Point);
for (int i=OrdersTotal()-1;i>=0;i--)
{
if (OrderSelect(i, SELECT_BY_POS))
{
if (OrderSymbol()!=Symbol() || OrderMagicNumber()!=MAGIC) continue;
if (OrderType()==OP_BUYLIMIT) b++;
if (OrderType()==OP_SELLLIMIT) s++;
}
}
if (Hour()>BUHour && Hour()<StartHour && AllProfit()>0) ClosePositions();
if (Hour()>BUHour && DayOfWeek() == 5) ClosePositions();
if (Hour()==StartHour && b<1 && DayOfWeek() != 5)
for(i=1;i<=Count;i++)
{
{
res=OrderSend(Symbol(),OP_BUYLIMIT,fLots(),fND(Ask-(Distance*Point+i*Step*Point)),3,fND(BuyPrice-StopLoss*Point),fND(Open[0]),"",MAGIC,expiration,Blue);
Sleep(3000);
if(res<0)
{
Print("??????: ",GetLastError());
} else {
RefreshRates();
}
}
}
if (Hour()==StartHour && s<1 && DayOfWeek() != 5)
for(i=1;i<=Count;i++)
{
{
res=OrderSend(Symbol(),OP_SELLLIMIT,fLots(),fND(Bid+(Distance*Point+i*Step*Point)),3,fND(SellPrice+StopLoss*Point),fND(Open[0]),"",MAGIC,expiration,Red );
Sleep(3000);
if(res<0)
{
Print("??????: ",GetLastError());
} else {
RefreshRates();
}
}
}
//----
return(0);
}
//+------------------------------------------------------------------+
double fND(double d, int n=-1)
{
if (n<0) return(NormalizeDouble(d, Digits));
return(NormalizeDouble(d, n));
}
//+------------------------------------------------------------------+
double fLots()
{
double lot=Lots;
double lot_min =MarketInfo( Symbol(), MODE_MINLOT );
double lot_max =MarketInfo( Symbol(), MODE_MAXLOT );
if (MM)
{
double lot_step =MarketInfo( Symbol(), MODE_LOTSTEP );
double lotcost =MarketInfo( Symbol(), MODE_TICKVALUE );
double dollarsPerPip=0.0;
lot = AccountFreeMargin()*TSP/100.0;
dollarsPerPip=lot/StopLoss;
lot=fND(dollarsPerPip/lotcost, 2);
lot=fND(lot/lot_step, 0) * lot_step;
}
if (lot<lot_min) lot=lot_min;
if (lot>lot_max) lot=lot_max;
return(lot);
}
//+------------------------------------------------------------------+
void ClosePositions()
{
if(BU)
for (int i=OrdersTotal()-1;i>=0;i--)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == Symbol())
{
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MAGIC)
{
if (OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, 3, Blue);
if (OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, 3, Red);
}
Sleep(1000);
}
}
}
//+------------------------------------------------------------------+
double AllProfit()
{
double Profit = 0;
for (int i=OrdersTotal()-1;i>=0;i--)
{
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() != Symbol() || OrderMagicNumber() != MAGIC) continue;
if (OrderSymbol() == Symbol() && OrderMagicNumber() == MAGIC)
if (OrderType() == OP_BUY || OrderType() == OP_SELL) Profit += OrderProfit();
}
return (Profit);
}
//+------------------------------------------------------------------+
请帮助我进行更正。该EA不会强行关闭未结订单。我希望在设置限额的同时,我们也能设置其强制关闭的时间。
我们需要TP和trall来优化它们。一个trall,这样所有的限制都会以一种小的方式关闭,但收集夜间的噪音。
引入了订单删除、计时、设置止损和拖网(取自这里https://www.mql5.com/ru/code/32662, 那里的解释相同)。
你怎样才能知道你的身份呢?
你写EA是为了收费,而且不在论坛上讨论?
有偿写作服务自由职业者。遵循该链接并阅读参考资料。
你好,请帮助。
我需要一个能在图表上寻找并显示截图中情况的EA。
计算中使用了正常SAR抛物线和正常线性回归通道。
所需的形成。
我将非常感激。我可以分享这些条目。
我将非常感激。我可以分享投入。
为什么要取笑ParabolicSAR--它完美地显示了输入和输出,因为它是。