Tag: mql5

如何从代码中调用DLL文件中的函数?

为什么第一个MessageBox()工作而第二个不工作? 我不知道问题出在哪里。 MQL5可以访问dll文件吗? 我需要调用读取JSON C#函数。 MetaEditor中没有出现错误。 C# .dll文件: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; namespace TestMe { class Test { // [DllExport(“Add”, CallingConvention = CallingConvention.StdCall)] public static int Add(int left, int right) { return left + right; } public static int Sub(int left, int right) { return left – […]

isNewBar()没有产生正确的时间随机值onTick MQL5

检查这个程序我试图获得Stochastic的值 #include CisNewBar current_chart; // instance of the CisNewBar class: // detect new tick candlestick void OnTick() { if ( current_chart.isNewBar() > 0 ) { int stoch = iStochastic(_Symbol,PERIOD_M1,5,3,3,MODE_SMA,STO_LOWHIGH); double K[],D[]; ArraySetAsSeries(K,true); ArraySetAsSeries(D,true); CopyBuffer(stoch,0,0,5,K); CopyBuffer(stoch,1,0,5,D); ArrayPrint(K); } } 这是我得到的输出: 95.97315 90.40000 74.11765 49.25373 25.00000 73.68421 81.87919 90.40000 74.11765 49.25373 74.34211 80.70175 81.87919 90.40000 74.11765 90.24390 […]