RecalcLastBarAfter Not Recognized in Scanner with MC64 Beta2
RecalcLastBarAfter Not Recognized in Scanner with MC64 Beta2
The RecalcLastBarAfter() function does not seem to work in studies applied to scanner windows in MC64 beta 2. This is critical when the scanner is loaded with long time frame data (e.g. daily), because otherwise "update on every tick" must be selected in order to view updates more frequently than the bar interval; which can create a tremendous CPU load with active symbols. Currently, with daily data loaded in the Scanner, if "update on every tick" is not selected, the calculation is based on the previous day's close for the entire day, which renders the scanner window useless for trading. I did not notice this problem with the MC64 pre-beta.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: RecalcLastBarAfter Not Recognized in Scanner with MC64 B
Hello Trader39,
"RecalcLastBarAfter" code word works in the scanner window.
If "update on every tick" option is disabled then the indicator code will be calculated only on the bar close.
You need to enable "update on every tick" option. You can limit your code from recalculation on every tick. With the following code sample your script will be executed each 100 ticks.
"RecalcLastBarAfter" code word works in the scanner window.
If "update on every tick" option is disabled then the indicator code will be calculated only on the bar close.
You need to enable "update on every tick" option. You can limit your code from recalculation on every tick. With the following code sample your script will be executed each 100 ticks.
Code: Select all
var: intrabarpersist count(0);
if barstatus=2 then count=0 else count = count+1;
if mod(count, 100) = 0 then
begin
// script body
end;