新人对MQL4和MQL5的任何问题,对算法和代码的帮助和讨论 - 页 1406 1...139914001401140214031404140514061407140814091410141114121413...1953 新评论 darirunu1 2021.03.02 19:19 #14051 MakarFX: 我希望一切都清楚了。 //+------------------------------------------------------------------+ //| AC_AO_Makar.mq4 | //| fxmvv@mail.ru | //+------------------------------------------------------------------+ extern double Lots = 1; extern double StopLoss = 10000; extern double TakeProfit = 10000; //+------------------------------------------------------------------+ int init(){} int deinit(){} int start() { int total; if(Bars < 10) { Print("Bars less than 10"); return(0); } //==================================== bool Buy = (iCustom(NULL,0,"FiboBars2",10,5,1)&&iCustom(NULL,0,"FiboBars_3",2,19,190,5,1)); //help bool Sell = (iCustom(NULL,0,"FiboBars2",10,5,0)&&iCustom(NULL,0,"FiboBars_3",2,19,190,5,0)); //================================= //Возвращает общее количество открытых и отложенных ордеров total = OrdersTotal(); if(total < 1) // ордеров нет { if (Buy) if(OrderSend(Symbol(),OP_BUY,Lots,Ask,5,Bid-StopLoss*Point, Bid+TakeProfit*Point) == 0) Sleep(5000); //help OrderSend(Symbol(),OP_BUY,lot,price,slippage,stoploss, //takeprofit, comment,magic,expiration,arrow_color); if(Sell) if(OrderSend(Symbol(),OP_SELL,Lots,Bid,5,Ask+StopLoss*Point, Ask-TakeProfit*Point) == 0) Sleep(5000); } //==================================== OrderClose, else // есть ордер { OrderSelect(0,SELECT_BY_POS,MODE_TRADES); if (OrderSymbol() != Symbol()) return(0); if(OrderType() == OP_BUY && Sell) OrderClose(OrderTicket(),OrderLots(),Bid,5); if(OrderType() == OP_SELL && Buy) OrderClose(OrderTicket(),OrderLots(),Ask,5); } } 对不起,请看一下盒子,交易没有打开。 Tretyakov Rostyslav 2021.03.02 21:14 #14052 darirunu1:对不起,请你看一下这个,交易没有打开。 0_о 它看起来不像是一个用于交易的EA,把它做成这样,并把条件放在那里 明天我将给你更多细节。 darirunu1 2021.03.03 05:43 #14053 MakarFX:0_о 它看起来并不像一个用于交易的EA,做到这一点,并把条件放在那里。明天会有更多细节。 就是这样做的。 Tretyakov Rostyslav 2021.03.03 06:02 #14054 darirunu1:就是这样做的。这就是一个干净的模板的样子//+------------------------------------------------------------------+ //| Expert.mq4 | //| Copyright 2021, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2021, MetaQuotes Software Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- } //+------------------------------------------------------------------+ //| ChartEvent function | //+------------------------------------------------------------------+ void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) { //--- } //+------------------------------------------------------------------+ 你的MetaEditor是什么版本? darirunu1 2021.03.03 06:13 #14055 MakarFX:这就是一个干净的模板的样子 你的MetaEditor是什么版本? 我在网上找到了一盏灯,就把它复制到那里,检查是否有错误。 有几个小的错误。改正了。因此,最初有AO和AC指标。我把我需要的东西放进去了。 Tretyakov Rostyslav 2021.03.03 06:32 #14056 darirunu1:我在网上找到了一盏灯,就把它复制到那里,检查是否有错误。 有几个小的错误.纠正了它们。因此,最初有AO和AC指标。我把我需要的东西放进去了。 你为什么要这样写呢? //==================================== bool Buy = (iCustom(NULL,0,"FiboBars2",10,5,1)&&iCustom(NULL,0,"FiboBars_3",2,19,190,5,1)); //help bool Sell = (iCustom(NULL,0,"FiboBars2",10,5,0)&&iCustom(NULL,0,"FiboBars_3",2,19,190,5,0)); darirunu1 2021.03.03 06:34 #14057 MakarFX:你为什么要这样写呢? 要进行交易,如果各自有两个相同的缓冲区,那就是两个红色或两个绿色的缓冲区。 Tretyakov Rostyslav 2021.03.03 06:47 #14058 darirunu1:要打开交易,如果各自有两个相同的缓冲区,那就是两个红色或两个绿色。 你没有仔细阅读,或者你没有阅读... 你所写的不是在比较两个指标的值 如果"FiboBars_3 "已经做了 ,为什么还要比较 "FiboBars2 "和 "FiboBars_3"? darirunu1 2021.03.03 06:54 #14059 MakarFX:你没有仔细阅读,或者你没有阅读...你写的不是两个指标值的比较 如果"FiboBars_3 "已经做了 ,为什么还要比较 "FiboBars2 "和 "FiboBars_3"? 我明白一切,也读过所有关于指标的描述,但我需要这种方式。 我可以稍后在私信中分享参数以及我想得到的结果。 Tretyakov Rostyslav 2021.03.03 07:08 #14060 darirunu1:我明白一切,也读过所有的指标描述,但我需要这种方式。 我可以在私信中分享参数和我想最终得到的东西。 bool Sell; bool Buy; if(iCustom(_Symbol,Period(),"FiboBars_3",12,24,48,2,0)==1) {Sell=true; Buy=false;} if(iCustom(_Symbol,Period(),"FiboBars_3",12,24,48,2,1)==1) {Sell=false; Buy=true;} 这是一个关于截图中数值的例子 1...139914001401140214031404140514061407140814091410141114121413...1953 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
我希望一切都清楚了。
对不起,请看一下盒子,交易没有打开。
对不起,请你看一下这个,交易没有打开。
0_о
它看起来不像是一个用于交易的EA,把它做成这样,并把条件放在那里
明天我将给你更多细节。
0_о
它看起来并不像一个用于交易的EA,做到这一点,并把条件放在那里。
明天会有更多细节。
就是这样做的。
就是这样做的。
这就是一个干净的模板的样子
你的MetaEditor是什么版本?这就是一个干净的模板的样子
你的MetaEditor是什么版本?我在网上找到了一盏灯,就把它复制到那里,检查是否有错误。 有几个小的错误。改正了。因此,最初有AO和AC指标。我把我需要的东西放进去了。
我在网上找到了一盏灯,就把它复制到那里,检查是否有错误。 有几个小的错误.纠正了它们。因此,最初有AO和AC指标。我把我需要的东西放进去了。
你为什么要这样写呢?
你为什么要这样写呢?
要进行交易,如果各自有两个相同的缓冲区,那就是两个红色或两个绿色的缓冲区。
要打开交易,如果各自有两个相同的缓冲区,那就是两个红色或两个绿色。
你没有仔细阅读,或者你没有阅读...
你所写的不是在比较两个指标的值
如果"FiboBars_3 "已经做了 ,为什么还要比较 "FiboBars2 "和 "FiboBars_3"?
你没有仔细阅读,或者你没有阅读...
你写的不是两个指标值的比较
如果"FiboBars_3 "已经做了 ,为什么还要比较 "FiboBars2 "和 "FiboBars_3"?
我明白一切,也读过所有关于指标的描述,但我需要这种方式。 我可以稍后在私信中分享参数以及我想得到的结果。
我明白一切,也读过所有的指标描述,但我需要这种方式。 我可以在私信中分享参数和我想最终得到的东西。
这是一个关于截图中数值的例子