Trying my hand at Expert Advisor, unable to use printf

 

Hi guys,


I started fooling around with MetaEditor and I'm not able to do a simple printf. Here is my code

double down = 10;
double fast=iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,0);

void OnTick()
{
  printf("fast=",fast);
  printf("slow=",down);
}

The code compile without error, I'm able to make it run in the Strategy Tester.

However when I'm looking at the journal this is all I can see over and over again.


2016.03.11 22:50:20.738    2016.03.10 19:28  test EURUSD,M5: slow=
2016.03.11 22:50:20.738    2016.03.10 19:28  test EURUSD,M5: fast=
2016.03.11 22:50:20.738    2016.03.10 19:28  test EURUSD,M5: slow=
2016.03.11 22:50:20.738    2016.03.10 19:28  test EURUSD,M5: fast=
2016.03.11 22:50:20.738    2016.03.10 19:28  test EURUSD,M5: slow=
2016.03.11 22:50:20.500    2016.03.10 17:44  test EURUSD,M5: fast=
2016.03.11 22:50:20.500    2016.03.10 17:44  test EURUSD,M5: slow=

What am I doing wrong?


Thanks in advance

 
You have no format flags. It looks like you just need to use Print()
 
I tried but the software doesn't seem to know this function, first I don't get the auto completion when I type it, then when I type it, it doesn't change color like other functions and when I try to compile it I have an error : 'print' - function not defined
 
Pronoe:
I tried but the software doesn't seem to know this function, first I don't get the auto completion when I type it, then when I type it, it doesn't change color like other functions and when I try to compile it I have an error : 'print' - function not defined
Print
 
oooooh, didn't pay attention of the Capital p. thanks for your help guys it worked.
Reason: