MQL4 - automated forex trading   /  

Forum

problems with an EA

Back to topics list To post a new topic, please log in or register

avatar
7
mkowal 2006.05.08 23:31 
hi, I have just started my adventure with MQL4 and I am really impressed with the possiblities of the system. I have written a simple custom indicator which doesn't work as it should. It is an indicator which should calculate the highest and lowest values of a day, and draw the highest and the lowest lines during the whole next day. the indicator does the job as it should, but only once - when the next bar comes, all values drop down to zero... I have no idea why.... . everything looks like it's ok - but well it doesn't work. Would anybody help me ? attached is the custom indicator. It also doesn't want to print on the screen the short name of the indicator.... Thank you in advance, mkowal
Attached files:
  Breaktout MK02.mq4 (2.92 KB)
Strings: Table of ASCII Symbols and Its Use

Strings: Table of ASCII Symbols and Its Use

In this article we will analyze the table of ASCII symbols and the ways it can be used. We will also deal with some new functions, the principle of operation of which is based on the peculiarities of the ASCII table, and then we will create a new library, which will include these functions. They are quite popular in other programming languages, but they are not included into the list of built-in functions. Besides, we will examine in details the basics of working with strings. So, I think you will certainly learn something new about this useful type of data.


avatar
92
ququr 2006.05.08 23:49 

You have this declaration both in global and under start():

double TodayHigh, PreviousHigh, TodayLow, PreviousLow;

I'm not sure, but I think that means they'll be cleared out on new tik when Start is run. I'd try commenting out "//" the extra declaration in the start function. Not near my MT4 machine, so no solid backup on that, but that's my gut feeling after glancing at the code.

-matt


avatar
7
mkowal 2006.05.09 00:23 
I have changed the following section: limit=Bars-1; for(i=limit+1; i>=0; i--) {. .. and it works.... !!! and of course I removed the double declaration of variables. thank you. But still no short name appears on the screen... :)
Back to topics list  

To add comments, please log in or register