-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathkantu.lpr
More file actions
91 lines (75 loc) · 3.17 KB
/
kantu.lpr
File metadata and controls
91 lines (75 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
program kantu;
{$mode objfpc}{$H+}
uses
{$DEFINE UseCThreads}
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
cmem,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, tachartlazaruspkg, kantu_main, kantu_definitions,
kantu_simulation, kantu_pricepattern, kantu_filters, kantu_custom_filter,
SysUtils, FileUtil, Controls, Graphics, Dialogs, Menus, Grids, StdCtrls,
ComCtrls, Buttons, Classes, kantu_loadSymbol, zmsql,
kantu_multithreading, kantu_portfolioResults, kantu_indicators,
kantu_regular_simulation, kantu_simulation_show, kantu_singleSystem;
{$R *.res}
procedure assignMainCaption();
begin
MainForm.Caption := 'OpenKantu v' + KANTU_VERSION + '- Parameterless system generator. by Daniel Fernandez, Copyright Asirikuy.com 2013-2015. This version is licensed under the GPL v2.';
end;
function slash(value:string):string;
begin
if (value='') then result:=''
else begin
{$IFDEF WINDOWS}
if (value[length(value)]<>'\') then result:=value+'\'
{$ELSE}
if (value[length(value)]<>'/') then result:=value+'/'
{$ENDIF}
else result:=value;
end;
end;
function getinstalldir:string;
begin
result:=slash(extractfiledir(paramstr(0)));
end;
procedure setMainFolder;
var
authenticationLoad: TStringList;
begin
MainForm.mainProgramFolder:= GetCurrentDir;
{$IFDEF DARWIN}
MainForm.mainProgramFolder:= copy(getinstalldir,1,pos(extractfilename(paramstr(0)),getinstalldir)-1);
SetCurrentDir(copy(getinstalldir,1,pos(extractfilename(paramstr(0))+'.app/Contents/MacOS',getinstalldir)-1));
{$ENDIF}
end;
begin
Application.Title:='Kantu - Price Pattern Parameter-lessTrading System '
+'Generator';
Application.Initialize;
Randomize;
//CheckValidity();
Application.CreateForm(TMainForm, MainForm);
setMainFolder;
Application.CreateForm(TSimulationForm, SimulationForm);
Application.CreateForm(TPricePatternForm, PricePatternForm);
assignMainCaption;
Application.CreateForm(TFiltersForm, FiltersForm);
Application.CreateForm(TCustomFilterForm, CustomFilterForm);
Application.CreateForm(TloadSymbol, loadSymbol);
// set proper formatting
DefaultFormatSettings.ShortDateFormat := 'yyyy.mm.dd' ;
DefaultFormatSettings.DateSeparator := '.' ;
DefaultFormatSettings.DecimalSeparator := '.' ;
MainForm.Enabled := true;
Application.CreateForm(TPortfolioResultForm, PortfolioResultForm);
Application.CreateForm(TSimulationForm2, SimulationForm2);
Application.CreateForm(TSingleSystem, SingleSystem);
// Please do not remove these messages //
ShowMessage('OpenKantu provides a framework for the automatic generation of trading systems using price action based patterns. The program does NOT contain any tools for the evaluation of curve-fitting or data-mining bias. Using it without proper knowledge about these sources of bias can lead to financial loses. To learn more about these sources of bias and get access to more advanced system generators please visit Asirikuy.com');
//
setMainFolder;
MainForm.parseConfig;
Application.Run;
end.