Simple EA Question

 

Hi,

I am trying a bit around with creating EAs.

But I don't seem to understand the start-function

The documentation says that it is called every tick, which I believe should be very often.

So I tried this test-script

http://pastebin.com/AyPZ9tb8

And it should flood my console with this text, but it doesn't, the output is this

2013.05.20 14:31:35    Test EURUSDt,M5: initialized
2013.05.20 14:31:35    Test EURUSDt,M5: INIT


and then nothing else. I am loged in and gettin market data ll the time and I am attaching this script to the m5-frame.

Woudl appreciate it if someone could help me =)

 
Jackels:

Hi,

I am trying a bit around with creating EAs.

But I don't seem to understand the start-function

The documentation says that it is called every tick, which I believe should be very often.

So I tried this test-script

You ran it as a Script,  a Script#s start() is just called once,  a Script is a one shot type of thing . . . an EA has it's start() called for each tick . . .   run your code as an EA,  copy it to the experts directory,  restart MT4 and drag and drop it onto your chart from the Navigator.
 
RaptorUK:
You ran it as a Script,  a Script#s start() is just called once,  a Script is a one shot type of thing . . . an EA has it's start() called for each tick . . .   run your code as an EA,  copy it to the experts directory,  restart MT4 and drag and drop it onto your chart from the Navigator.


Ah poor wording there from me. No I used it as an EA ( rightclicked it in the navigator under EA and attached it to the chart ).

But even if it would have been used as a script, there should have been one instance of "This should be flooding my console." in the log.

 
Jackels:

Ah poor wording there from me. No I used it as an EA ( rightclicked it in the navigator under EA and attached it to the chart ).

But even if it would have been used as a script, there should have been one instance of "This should be flooding my console." in the log.

OK,  yes, assuming you turned EAs on,  did you ?

 

 
Oh >_> Silly me. No I didn't; overlooked that button. Thanks for the answer :D
 
Remove the button from the tool bar. Always look for the smiley face.
Reason: