[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 412

 

Junko, page 409, the very bottom post - it says why the data is updated. Because iOpen(), iClose() are called, and you prove that from RefreshRates(). The first time the script was run without RefreshRates(), but iOpen() and iClose() functions were called, and from this the terminal loads the data. On the second run the data was already there and we know that zero bar is loaded first, so the impression is that the data is all loaded, but it may not be all loaded, but it may be in process.

...And yet you prove that you've figured out the data loading.... what streams and synchronisations can we be talking about here...

 

I wrote this simple code for testing purposes:

Ma_8= iMA(NULL,PERIOD_M5,8, 0,MODE_EMA,PRICE_CLOSE,0) ;

if ( Bid<Ma_8 ) { SetVLine(Blue,"",0,1,1);} 


void SetVLine(color cl, string nm="", datetime t1=0, int st=0, int wd=1) {
if (nm=="") nm=DoubleToStr(Time[0], 0);
if (t1<=0) t1=Time[0];
if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_VLINE, 0, 0,0);
ObjectSet(nm, OBJPROP_TIME1, t1);
ObjectSet(nm, OBJPROP_COLOR, cl);
ObjectSet(nm, OBJPROP_STYLE, st);
ObjectSet(nm, OBJPROP_WIDTH, wd);
}

and here's a screenshot of the results.

Can you please tell me why there are no blue lines in red circled areas? I don't think anyone will have any doubts that BID was not less than average there ...

 
lottamer:

I wrote this simple code for testing purposes:

and here is a screenshot of the results.

Please tell me why there are no blue lines in red circled areas? I don't think anyone will have any doubts that BID was really less than average there ...


Replace Bid with iClose(NULL,PERIOD_M5,0) and PERIOD_M5 with NULL.

This must be the indicator on the visual test chart?

 
Integer:


Replace Bid with iClose(NULL,PERIOD_M5,0) and PERIOD_M5 with NULL.

This must be the indicator on the visual test chart?


No. It is a tester.

And I don't need iClose. I just need bid.

I also don't need NULL I needPERIOD_M5

 
lottamer:


1. no. it's a tester.

And I don't need iClose. I just need bid.

I also don't need NULL I need PERIOD_M5


That the tester, that's obvious. What is in the tester? Is this EA being tested in visual mode, or is an indicator thrown over the window of visual testing?

The iClose of the forming bar (zero) is the bid.

 
Integer:


That the tester, that's obvious. In the tester, what? Is it the Expert Advisor being tested in visual mode, or is the indicator thrown over the visual test window?

The iClose of the forming bar (zero) is the bid.



it is testing in visual mode
 
lottamer:

is testing in visual mode
What isthe testing mode? Is it not at opening prices?
 

We take this case and study it. We see some bar on the chart with incorrect results, we take its time and write it in the Expert Advisor:

if(Time[0]==StrToTime("time of this bar")){

Print(...); // print something in the log

}

Then we look at the log file and analyze why.

 
Integer:
What is the test mode? Not by opening prices?


oh shit! really"opening prices"! how they got there - don't know. always tested for "all ticks".

Thanks so much! :)

 
Integer:

We take this case and study it. We see some bar on the chart with incorrect results, we take its time and write it in the Expert Advisor:

if(Time[0]==StrToTime("time of this bar")){

Print(...); // print something in the log

}

Then we look at the log file and analyze why.


Thank you, that will also come in handy. there are often "wrong bars".

And what format should I use to enter the time?

Reason: