Code compile without error, but study is not in the list

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1263
Joined: 23 Nov 2010
Has thanked: 717 times
Been thanked: 221 times

Code compile without error, but study is not in the list

Postby arjfca » 04 Jun 2012

Hello

A little code is compiling, but
- All variables are kept grey (usually, pink)
- The study does not appear in the Study List

Code: Select all

//Collect Data for statistic
var:

ResultString (""),
Comma ("'"),
Synch (False),
IsAPivot(False);
 
If Barstatus = 2 then begin
   If synch = true then begin
        If Time < (2359) then begin
              If SL or SH then begin
                 ResultString = ResultString + "True" + Comma;
              end
              else Begin
                ResultString = Resultstring + "False" + Comma;
              end;
           end
           If Time = (0000) then begin
              ResultString = ResultString + Newline;
               FileAppend("C:\temp\filetest",ResultString);
             End
   else begin
   If dayofweek(date) = 0 and time = (0000) then synch = true;
   end;
end;

This little code is to create a text file to show if a one hour bar is a Spike high or Spike Low
This will then be studied in Excel

Any reason why it show that it compiled successfully, but does not appearing in the study list?

Martin
** SH and SL or internal function and not causing any problem

Martin

arjfca
Posts: 1263
Joined: 23 Nov 2010
Has thanked: 717 times
Been thanked: 221 times

ResolvedCode compile without error, but study is not in the

Postby arjfca » 04 Jun 2012

Closed everything and restart

-Copied code in a new file and re-compile
- MC did found some errors, report them

Now compile OK

Strange.... Work like an old Windows system... close and reload. It was usually repairing most of problem.... :)

Martin


Return to “MultiCharts”