function: local variable do not increase at the second bar  [SOLVED]

Questions about MultiCharts and user contributed studies.
chi jeongki
Posts: 39
Joined: 29 Nov 2007
Has thanked: 8 times
Been thanked: 2 times

function: local variable do not increase at the second bar

Postby chi jeongki » 08 Jun 2014

Used one symbol, time frame of data1 500 tick, data2 5000 tick.
calling code is a signal not an indicator.
count_called do not increase at the scond bar.
Intended ? or Bug?

Code: Select all

Input: file_output(StringSimple), line_called(StringSimple), count_calling(NumericSimple), simple_close(NumericSimple), series_close(NumericSeries);
Var: count_called(0);

count_called = count_called + 1;

print(File(file_output), line_called, ": ",
FormatDate("yyyy-MM-dd ", DateTime data1), FormatTime("HH:mm:ss ", DateTime data1), BarNumber data1:6:0,
open data1:6:2, high data1:6:2, low data1:6:2, close data1:6:2, upticks data1:10:0, downticks data1:10:0,
" ",
FormatDate("yyyy-MM-dd ", DateTime data2), FormatTime("HH:mm:ss ", DateTime data2), BarNumber data2:6:0,
open data2:6:2, high data2:6:2, low data2:6:2, close data2:6:2, upticks data2:10:0, downticks data2:10:0,
" ",
count_called:6:0, count_calling:6:0, " ",
"simple = [", simple_close, simple_close[1], simple_close[2], simple_close[3], "] ",
"series = [", series_close, series_close[1], series_close[2], series_close[3], "]");

_lang_print_loop = 1;

Code: Select all

Var: count_calling(0);
Var: output_file("c:\_lang_caller_print_loop.txt");


count_calling = count_calling + 1;
_lang_print_loop(output_file, "----begin----", count_calling, close data1, close data1);


print(File(output_file), "barnumber = ", BarNumber data1:0:0, NewLine, "maxbarsback = ", maxbarsback:0:0);


count_calling = count_calling + 1;
_lang_print_loop(output_file, "-----end-----", count_calling, close data1, close data1);
output: attached file
Attachments
_lang_caller_print_loop.txt
(51.83 KiB) Downloaded 437 times

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 558 times

Re: function: local variable do not increase at the second b

Postby Andrew MultiCharts » 10 Jun 2014

Hello chi jeongki,

We will study the issue and i'll let you know.

chi jeongki
Posts: 39
Joined: 29 Nov 2007
Has thanked: 8 times
Been thanked: 2 times

Re: function: local variable do not increase at the second b

Postby chi jeongki » 10 Jun 2014

For reproduction, I exported the data I used.
I am attaching it.
Attachments
symbol_tick_data.txt
tick data used.
(1.93 MiB) Downloaded 424 times

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 558 times

Re: function: local variable do not increase at the second b  [SOLVED]

Postby Andrew MultiCharts » 17 Jun 2014

It will be fixed in MultiCharts 9.0 beta 2.


Return to “MultiCharts”