Forum

MQL array to C# DLL only passes 1 row

Hi, When I send an array of ints from MQL to C# DLL I only received one of them. In C# im just looping through the int values and attaching them to the return string, also attaching count of array elements to the return string. C# using System; using System.Collections.Generic; using System.Linq;

In live the EA places duplicate trades sometimes

Hi, Very odd anomaly is happening. In my backtest the EA trades as programmed, one trade per day, but sometimes it places two trades in live with in one second time difference and open price is only few pipettes apart. When I backtest the exact date of the duplicate trades, then it places a single

Forward declaration is not working

Hi, I have used forward declaration before, but for some reason this situation fails. Any idea what I'm doing wrong? I have attached the necessary files also. #include<Test\Foo.mqh> #include<Test\FooNode.mqh> Foo<FooNode*> foo; int OnInit () { return ( INIT_SUCCEEDED ); } void OnTick () {

Rectangle object not showing when end point isn't last bar

Hi, public : string DrawRectangle( string Name, ENUM_TIMEFRAMES Timeframe, int StartBar, double StartPrice, int EndBar, double EndPrice, int Color) { datetime StartBarTime = iTime ( Symbol (), Timeframe, StartBar); datetime EndBarTime = iTime ( Symbol (), Timeframe

No undeleted object detection in MQL5, but MQL4 has

Hi, Initially I developed in MQL4 and it helped with leaked memory. But in MQL5 I do not get the backtester to help me like that. Is it something I can enable somehow? Thank you, Hendrik

OrderSend error 130 on index but not on Forex symbols

Hi, I would presume that the same EA that works on one symbol would work on all other. But mine doesn't work on indexes and stocks. Any idea what is wrong? Best Regards, Hendrik

Backtesting but market closed on order execution.

Hi, I wanted to test my strategy on stock and had to changed the demo account, using VantageFX-demo account. Had to switch the filling_type to SYMBOL_ORDER_MARKET and then I got the " Market closed " error on order execution. With other order types is got "unsupported filling type". I can't seem to

Sending nested structs to C# DLL

Hi, To make the code a bit more structed I was thinking of passing a stuck within a struct to C# DLL, not that I had to include such complexity. But it is not working. Is it even possible to send such structures to DLL? MQL struct bar { double open; double high;

Return C# struct to MQL via DLL

Hi, I would expect the following code to work. But MQL giving "'Order' - illegal returned type". Any idea why? C # namespace ExpertAdvisor { public class ExpertAdvisor { [DllExport] public static Order Order() { Order Order = new Order();

MQL datetime to C# DLL

Hi, Almost at the end of getting all the basics working when using DLL. But I have the last issue with passing datetime. MQL alert results when printing DLL return and simply MQL. C# should print the same date as native MQL, but it doesn't. C# using System; using System.Collections.Generic; using