inputdouble Lots = 0.1;
//+------------------------------------------------------------------+// Connect the DLL adapter, using which we are going to use the DLL neuronet created in NeuroSolutions#import "NeuroSolutionsAdapter.dll"int CalcNeuralNet(string dllPath, string weightsPath, double& inputs[], double& outputs[]);
#import //+------------------------------------------------------------------+class CNeuroSolutionsNeuralNet
{
private:
string dllPath; // Path to a DLL neuronet created in NeuroSolutionsstring weightsPath; // Path to a file of the neuronet balancespublic:
double in[20]; // Neuronet inputs - OHLC of 5 barsdouble out[1]; // Neuronet outputs - Close of a current bar
CNeuroSolutionsNeuralNet();
bool Calc();
};
//+------------------------------------------------------------------+void CNeuroSolutionsNeuralNet::CNeuroSolutionsNeuralNet()
{
string terminal = TerminalInfoString(TERMINAL_PATH);
dllPath = terminal + "\\MQL5\\Files\\NeuroSolutions\\WeekPattern.dll";
weightsPath = terminal + "\\MQL5\\Files\\NeuroSolutions\\WeekPattern.nsw";
}
//+------------------------------------------------------------------+bool CNeuroSolutionsNeuralNet::Calc()
{
// Get current quotes for the neuronetMqlRates rates[], rate;
CopyRates(Symbol(), Period(), 0, 6, rates);
ArraySetAsSeries(rates, true);
// Fill the array of input data of the neuronetdouble zlevel=0;
for (int bar=0; bar<=5; bar++)
{
rate = rates[bar];
// 0 bar is not taken for inputif (bar==0) zlevel=rate.open; // level of price calculation// 1-5 bars are inputedelse
{
int i=(bar-1)*4; // input number
in[i ] = rate.open -zlevel;
in[i+1] = rate.high -zlevel;
in[i+2] = rate.low -zlevel;
in[i+3] = rate.close-zlevel;
}
}
// Calculate the neuronet in the NeuroSolutions DLL (though the DLL adapter)int res = CalcNeuralNet(dllPath, weightsPath, in, out);
switch (res)
{
case1: Print("Error of creating neuronet from DLL \"", dllPath, "\""); return (false);
case2: Print("Error of loading balances to neuronet from the file \"", weightsPath, "\""); return (false);
case3: Print("Error of calculation of neuronet"); return (false);
}
// Output of the neuronet has appeared in the array out, you shouldn't do anything with itreturn (true);
}
//+------------------------------------------------------------------+
CNeuroSolutionsNeuralNet NN;
double Prognoze;
//+------------------------------------------------------------------+#include <Trade\Trade.mqh>//+------------------------------------------------------------------+voidOnTick()
{
// Get the price prediction from the neuronetif (NN.Calc()) Prognoze = NN.out[0];
else Prognoze = 0;
// Perform necessary trade actions
Trade();
}
//+------------------------------------------------------------------+void Trade()
{
// Close an open position if it is opposite to the predictionif(PositionSelect(_Symbol))
{
long type=PositionGetInteger(POSITION_TYPE);
bool close=false;
if((type == POSITION_TYPE_BUY) && (Prognoze <= 0)) close = true;
if((type == POSITION_TYPE_SELL) && (Prognoze >= 0)) close = true;
if(close)
{
CTrade trade;
trade.PositionClose(_Symbol);
}
}
// If there is no positions, open one according to the predictionif((Prognoze!=0) && (!PositionSelect(_Symbol)))
{
CTrade trade;
if(Prognoze > 0) trade.Buy (Lots);
if(Prognoze < 0) trade.Sell(Lots);
}
}
//+------------------------------------------------------------------+
第178行错误:'Close'--常量变量不能作为参考传递
第178行错误:'Close'--常量变量不能作为参考传递
买入信号。
smfisher transform 3必须是浅蓝色。
renko maker箭头;绿色和小盒子绿色。
Pcci必须高于中间线
欢乐的太阳风没有重绘:绿色
渔夫非重绘绿色
亲爱的朋友们。
你能不能把"字体大小"的值附在日记里?
谢谢你...
Mladen,我有问题。是否有可能通过这样的代码来连接输入值。
main.cpp (适配器)
b) 最后的价格值和指标是多少,以及它应该如何与Neurosolyutions中使用的库文件对接
c) 构建预测的蜡烛模式。但是,有必要改变顾问的指标。
p.s.如果你能修复显示代码--你可以使用任何一个指标的名称(样本1,2......)。 它的目的是建立--线,С输的价格(列,我选择的预测)...
Mladen,我有问题。是否有可能通过这样的代码来连接输入值。
main.cpp (适配器)
b) 最后的价格值和指标是多少,以及它应该如何与Neurosolyutions中使用的库文件对接
c) 构建预测的蜡烛模式。但是,有必要改变顾问的指标......
p.s.如果你能修复显示代码--你可以使用任何一个指标的名称(样本1,2......)。 它的目的是建立--线,С输的价格(列,我选择的预测)...
对不起,我对NeuroSolutions不熟悉,所以我不能在这个问题上提供帮助。
你好,Mladen,请问是否可以将指标的信号延迟到个人定义的时间。例如,我有一个箭头指标,有时会在30分钟图表上的当前蜡烛上显示出从蜡烛开始的箭头,但我想不考虑这样的信号,因为它们大多数时候倾向于恢复/消失。我希望有一个指标/脚本,或者是否有可能调整指标本身,在一个特定的时间开始显示信号。
请提前感谢。
你好,Mladen,请问是否可以将指标的信号延迟到个人定义的时间。例如,我有一个箭头指标,有时会在30分钟图表上的当前蜡烛上显示出从蜡烛开始的箭头,但我想不考虑这样的信号,因为它们大多数时候倾向于恢复/消失。我希望有一个指标/脚本,或者是否有可能调整指标本身,在一个特定的时间开始显示信号。
提前感谢。
不能对任何在闭合条上的信号进行操作。
即使是在一个已打开的条形图上,也很难做到延迟什么时间(在某些情况下,它不会工作)。
Mladen,我有问题。是否有可能通过这样的代码来连接输入值。
main.cpp (适配器)
b) 最后的价格值和指标是多少,以及它应该如何与Neurosolyutions中使用的库文件对接
c) 构建预测的蜡烛模式。但是,有必要改变顾问的指标。
p.s.如果你能修复显示代码--你可以使用任何一个指标的名称(样本1,2......)。 它的目的是建立--线,С输的价格(列,我选择的预测)...
这是处理条目的部分
亲爱的mladen。
你能不能帮我纳入一个策略,通过修改你的3MA交叉与aert mtf 3.03来帮助驾驭 短时框架内的回撤/回拉/反转/反弹 的 势头 ?
当3个MA交叉发生并且蜡烛的大小超过用户输入的点数时,指标会以明亮的颜色突出显示,并且在蜡烛上打印出条形前的数字(以了解交叉动作的最新时间),同样,当反弹发生并且价格穿过中间的MA时,蜡烛会被突出显示并且打印出条形前的数字。
我一直热切地期待着你的多货币MTF热图,关于MA交叉的热图。希望你能抽出时间来做这件事。
谢谢你。