How to code? - page 95

 

KuPretMan

Have a look at these two EA's.

 
 

how to include a file.txt in an mq4 file ??

Hi everybody

I've got a file (var.txt) with some variables

//************var.txt*********************//

double high_d1 = iHigh(NULL, PERIOD_D1, Current + 0);

double low_d1 = iLow(NULL, PERIOD_D1, Current + 0);

double highp1_d1 = iHigh(NULL, PERIOD_D1, Current + 1);

double lowp1_d1 = iLow(NULL, PERIOD_D1, Current + 1);

double sto14 = iStochastic(NULL, 0, 14, 3, 5, MODE_EMA, 0, MODE_MAIN, Current + 0);

double sto14s = iStochastic(NULL, 0, 14, 3, 5, MODE_EMA, 0, MODE_SIGNAL, Current + 0);

double sar = iSAR(NULL, 0, 0.02, 0.2, Current + 0);

double open = iOpen(NULL, 0, Current + 0);

double close = iClose(NULL, 0, Current + 0);

//*******************************//

and I want to put this file in an mq4 file (test.mq4) with the fonction "include" like this

#include

But the programm return this message : " #include cannot open the programm file"

Is it possible to do that ? and how?

Thanks in advance for your help!!

 

yes, were are you putting your file. It has to be located in your include directory for it to be seen if your using the brakets. If your puting your include file in the main EA directory or in the indicator directory then you must use " " instead of the .

Keit

 

KuPretMan

waltini:
Have a look at these two EA's.

Tell us why.

Big Be

 

Can't find }}'s! Help!

Can someone help me find where I'm missing the }}'s? If I add them to the end, it'll compile, but I can't find where I'm missing them.

Thanks!

Never minde. Found it.

 

@ FerruFX

1.) i try to explain my ideas for the entry/exit moneymanagment in the next days, please send me your email per MP (but its not easy, im not a "native english speaker"...)

2.) could you look over the EA once more - the control function works great, but now this function will avoid that the EA switch the position from long to short ore short to long by itself if a new signal comes out - the EA will now only entry into a trade, if the position is stopped out or reached its take profit, but often the EA should switch after a period of time. is it possible to get the "switch position" function working beneth the "control function" ?

i hope you can understand what im trying to tell..

thank you for the help

clarc

 
clarc:
@ FerruFX please send me your email per MP

I sent you a PM 2 days ago.

FerruFx

 
FerruFx:
I sent you a PM 2 days ago. FerruFx

oh yes, i havent noticed that until now.... sorry, i will answer @ weekend, could you look into the EA because of the "position switch" problem ?

 
FerruFx:
I sent you a PM 2 days ago. FerruFx

you got mail ;-)

Reason: