#property copyright"Copyright 2021, MetaQuotes Ltd."#property link"https://www.mql5.com"#property version"1.00"//--------------------------------------------------------------------// Mas_Ord_New_[150][9]; // Массив ордеров последний известный// Mas_Ord_Old_[150][9]; // Массив ордеров предыдущий (старый)// Mas_Tip_[6]; // Массив коллич. ордеров всех типов//+------------------------------------------------------------------+#include <Trade\Trade.mqh> //Класс CTrade обеспечивает упрощенный доступ к торговым функциям.#include <Trade\SymbolInfo.mqh> //Класс CTrade
CSymbolInfo SymbolInfo; // Объект класса Для получения параметров по инструменту#include <Trade\PositionInfo.mqh>;
CPositionInfo PositionInfo; //объект PositionInfo класса СPositionInfo Для получения параметров открытых позиций#include <Trade\OrderInfo.mqh>;
COrderInfo OrderInfo; //Объект OrderInfo класса COrderInfo Для получения параметров отложеных ордеров#include <Fibo_Level.mqh>
Fibo_Levell Level_Fibo2;
//+------------------------------------------------------------------+class Terminal : public CTrade
{
private:
public:
Terminal();
~Terminal();
void Order_and_Pozition_Info
(
int &up_F_, //Глобальный счётчик типов TrendLineUpint &down_F_, //Глобальный счётчик типов TrendLineDownint &ID_Fibo_Up_, //Счётчик-идентификатор фибо для сделок int &ID_Fibo_Down_,
int OrderFibo_78_,
int STP_,
int &Mas_Tip_[], // Массив колич. ордеров всех типовdouble &FiboUp_New_[][],
double &FiboDown_New_[][],
string Sparam,
double &Mas_Ord_New_[][],
double &Mas_Ord_Old_[][],
bool Alert_sig_Terminal_,
bool &flag_interation_
);
};
所有这些方法的基类不允许你使用其子类的方法))))。
结论是显而易见的--在你自己中创建你需要的类的对象。
这可能是不可能实现的
它不给 - 在符号上,必须有一个位置(如果它被关闭的利润和重新打开一个位置)(当应用相反的信号 - 它不能在其他方向打开
如果只是从一个信号(从一个点),没有问题。(而这一点不应该出现在代码中(上面一行))。
你好!
我找遍了整个网络,没有找到任何针对mql5的解决方案,但对于mql4,我找到了一个关于mql4的EA,它对双方都有效:买入和卖出--同时。我可能会尝试把它作为基础.........,但我必须把它从mql4重写成MQL5。
我把他的文件附在后面,让你熟悉一下。
你好!
我找遍了整个网络,没有找到任何针对mql5的解决方案,但我在mql4上找到了一个专家顾问,它可以同时在两个方向工作--买入和卖出。我可能会尝试把它作为基础.........,但我必须把它从mql4重写成MQL5。
我把他的文件附在后面,让你熟悉一下。
这个EA不与指标一起工作,它可以向任何方向打开。你有一个指标,你希望它在趋势移动时打开。
-我们建立的专家顾问,它也可以向两个方向开放,但只向指标显示的趋势方向开放。
这个专家顾问不与指标一起工作,它可以向任何方向打开。但你有一个指标,你希望它在趋势中打开。
-我们创建的专家顾问,它也可以向两个方向打开,但只向指标所显示的趋势方向打开。
请原谅我?
我发给你的那个订单同时 打开2个订单(卖出和买入),如果一个订单在获利时被关闭,另一个订单保持不变,被关闭的那个订单再次打开,方向是被关闭的方向。而被留下的那个人开始由马丁工作。当趋势发生变化时,一切都会朝着相反的方向发生。
如果我们建立的那个EA可能 同时 向两个方向打开,那么为什么它只向一个方向打开(如指标所示)?
我不明白!!。
你是什么意思?
我发送的那个订单同时 打开2个订单(卖出和买入),如果其中一个在获利时被关闭,另一个保持不变,被关闭的那个订单再次打开--朝着它被关闭的方向。而被留下的那个人开始由马丁工作。当趋势发生变化时,一切都会朝着相反的方向发生。
如果我们建立的那个EA可能 同时 向两个方向打开,那么为什么它只向一个方向打开(如指标所示)?
我不明白!
你看,他从信号开始开盘,一直开到利润消失。
输入 bool InpVariant =false; // 选项1.variant
输入 bool InpVariant =true; // 选项2.variant
输入 bool InpClOp =false; // 关闭反面。
这里--从信号开放开始,直到利润被触发。
输入 bool InpVariant =false; // 选项1.variant
输入 bool InpVariant =true; // 选项2.variant
输入 bool InpClOp =false; // 关闭
所以它没有发挥作用?太糟糕了 !!!!
我不相信没有解决办法 - 我将继续上网。
这并不奏效,不是吗?太糟糕了 !!!!
我不相信没有解决办法,所以我将继续上网。
你实际上可以添加一个对象来打开和关闭--那么它可能会工作,但这是一个痛苦的任务。
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
而不是通常的TP,使其从水平线关闭和打开。
结论很明显--在你自己的类中创建你需要的类的对象。
我是通过从CTrade继承我的类来做到的,这样我至少可以在没有对象的情况下使用交易函数)))谢谢你!
Sprut 185 : Короче не прокатило? А жаль !!!!
好吧,我不相信没有解决办法——我会继续上网。
可能正如你所计划的那样——结果似乎已经发生了。
你好!
我找遍了整个网络,没有找到任何针对mql5的解决方案,但我在mql4上找到了一个专家顾问,它可以同时在两个方向工作--买入和卖出。我可能会尝试把它作为基础.........,但我必须把它从mql4重写成MQL5。
我把文件附在后面,以便你熟悉它。
我昨天下载了它,想看一看......突然间,互联网被我夺走了。一场雷雨过后,我在当天剩下的时间里有一些技术工作。出于闲暇,我决定用MQL5重写它,并在此 发表。
因此,每朵云都有一线生机.........