Skip navigation.
Home
Metatrader community - Forex Trading with Metatrader

dougr3's blog

dll needs float type

Metatrader 4

The dll I'm using requires a float type. MT4 only uses double types. How do I send a double to a fuinction like

//(code from tradecel.H)
short _stdcall TRADE_ASK(float *ov);

When I try to use this function in mt4 I get an "incompatible type" error

#import "TRADECELGBPOPEN.DLL"
double TRADE_ASK(double& currask[0])
{return(answer);}
//
answer1=TRADE_ASK(currask[0]);

Any ideas anybody?

Need help converting a Tradestation ELA to MQ4

Other

I have been working on converting a Tradestation ELA to Metatrader to use as an indicator. The mq4 uses a dll to access a neural net I have trained. It is giving me some problems.

Here is the current problem. The neural net was developed to take 10 inputs. When I run the mq4 I get an eror to "do a TRADE_ASK" before adding more inputs. This is an error from the dll. It seems the stack doesn't flush if a previous attempt to run the mq4 fails.

here is the code I've come up with so far

//+------------------------------------------------------------------+
//| darNN.mq4 |

XML feed