[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 325

 
Daiver2 >> :

Hello all, who can explain? This is the RefreshRates() function, should it always be called or when expert or script makes long calculations, it is triggered automatically, for example in error handling function?
Second question: here is an example of code, I fixed an error, passed a parameter to switch operator...

well, now there's another error, like an undefined B variable
didn't I declare it?

This is what the error message looks like:
'B' - variable not defined ----------------- C:\Program Files\MetaTrader - Masterforex\experts\scripts\2.mq4 (31, 7)

Here is another question, what are these numbers? (31, 7), they are always different for different errors, I looked at the same entries in the specified directory, it's just like an error name in a document... is it possible in MetaEditor 4, somewhere to see the description of the solution, for example, as in Expert, the errors of execution and execution correspond to their values, where for each number specific cause of error???

You declared the variable in the body of the start function, so outside the function its translator "does not see" it. Declare it globally before start, it should be fine. The numbers are line and character number where the error occurred.

 
for speed today...
 
alsu >> :
on the speed today...

>> >> heh... Such a joy to encounter a familiar question that I hurry to answer it in the expectation that my question won't be circumvented on occasion.

 
Tarkovsky >> :

How do I use the script to set my own scale on the chart?

The functions that tell you which bar is displayed first are there, but how to reset it is not.

Well, you've just answered your own question...

 
alsu писал(а) >>

You declared the variable in the body of the start function, so outside the function its translator "does not see" it. Declare it globally before start, it should be fine. The numbers are line and character number where the error occurred.

Thank you all for your help...Vinin also explained it, I kind of read it in the tutorial before and knew it, but as I understand it is for experts? and if it is just like a script, it seems to have all the code in the special start function ? I make separate functions and blocks in the form of a script just to check whether it works or not...I'm learning...

 
alsu писал(а) >>

Well, you actually answered your own question...

Is there no way?

I would like the chart to be shown from a given point in time.

For example, to show the daily candlesticks starting from the candlestick of the previous month.

Is such a simple need not implemented?

 
Tarkovsky >> :

Is there no way?

I would like the chart to be shown from a given point in time.

For example, show the daily candles starting from the candle of the previous month.

Is such a simple need not implemented?

Is this necessary to view the story?

Create a vertical line at the desired time, open the List of Objects (Ctrl+B), select the line - Show.

Automatic shift of the line is better to be switched off)

 
Swan писал(а) >>

Do you need this to view the history?

create a vertical line with the desired time, open Object List(Ctrl+B), select line - Show.

Automatic shift of the graph is better to disable)

This is better than nothing.

And "show object" - there is no such function?

The original idea was to show some arbitrary events on the history. For example, to see where candlesticks without shadows are usually formed, or specific location of indicators on the history. Suppose they are "standing" now, the address of a place where they were standing before can be found using the script, but it is difficult to look there through the eyes.

 

Dear traders, help me deal with this problem. I have an indicator in which I manually set the datetime value. It looks like this

For example current date is 2009.12.02

Then the datetime should be: yesterday's date

datetime some_time=D'2009.12.01 01:30';

..............................

..............................

..............................

int shift=iBarShift(NULL,0, some_time);

Actually the question is how to replace manual shift of some_time with automatic shift

 

PEOPLE HELP ME OUT !!!!! i'm not a programmer, i'm just a trader!!! i've got this problem... WHEN I RAN THE EA FOR OPTIMIZATION I GOT THE VALUES, I CHOSE THE VALUES WITH THE MINIMUM DRAWDOWN, I COPIED THEM ON A PIECE OF PAPER... AND THEN ACCIDENTALLY CLICKED AGAIN ON THE OPTIMIZATION. I DECIDED TO WAIT UNTIL THE OPTIMIZATION IS COMPLETE IN ORDER NOT TO GET LOST IN IT, BECAUSE I HADN'T COPIED ALL VALUES. AFTER I FINISHED, I CHOSE MINIMAL DRAWDOWN AND GOT NEW VALUES! WHY????????? I DID NOT CHANGE THE DATE OR EXPERT PARAMETERS!!!! I SHOULD HAVE GOT THE SAME PARAMETERS AS IN THE FIRST CASE!!! IF YOU WOULD BE SO KIND AS TO EMAIL ME THE ANSWER AT Nikolay_Sokolov@mail.ru.
Thanks in advance.