Beste forum leden,
Sinds enkele dagen gebruik in Vestics. Mijn programmeer kennis is nu nog niet direct geweldig te noemen. Onderstaand heb ik een code van een goed en mooi werken systeem van online-futurestrading.com. Hij heeft een mooi break-out systeem ontworpen voor de dowJONES emini.
Voor resultaten en codes: http://www.online-futurestrading.com/ex ... system.htm
Nu probeer ik de code die hij heeft geplaatst op de website in gang te krijgen in vectics. Hetis tenslotte een EL code. Echter toch krijg ik een aantal foutmeldingen.
Is er hier misschien iemand die deze code WEL aan de slag krijgt in Vestics??
code:
{****** Mini Dow Jones Range Breakout system v1 Jan 2005 ***************************
Original design by Sidinuk - www.online-futurestrading.com
Code - Russell Stagg [rs@profex-international.com]
DATA1 Symbol YM(H)05.D 1 or 5 min chart - NB not full Globex session
DATA2 Symbol YM(h) 05.d Daily chart AT Least 4 months worth of data required}
Input: Open_range_time(1645),Endtime(2100),Showtext(true),Text_Displace(100);{All times are UK(GMT)}
Var: n(1),Trade_Flag(true),PLot_hi(0),Plot_lo(0),Decimals(0);
Var: Low_line(-1),OR_Bar(-1),Hi_Line(-1),Hi_text(-1),Lo_text(-1);
{Position Sizing Algorithm}
N = 1;
{Open Range Plot Variables}
if CurrentSession(0) <> CurrentSession(0)[1] and barstatus(1) = 2 and CurrentSession(1) <> -1 then begin
Plot_hi = 0;
Plot_lo = 0;
Trade_Flag = true;
end;
if time = Open_range_time then begin
Plot_hi = Highd(0);
Plot_lo = lowd(0);
{Draw Lines}
If dayofweek(date) <> 4 then begin
Hi_line = TL_new(date,time,Plot_hi,date,endtime,Plot_hi);
Tl_setstyle(Hi_line,tool_dashed2);
Low_line = TL_new(date,time,Plot_lo,Date,endtime,Plot_lo);
Tl_setstyle(Low_line,tool_dashed2);
OR_bar = TL_new(date,time,Plot_hi,date,time,plot_lo);
TL_setcolor(OR_bar,lightgray);
{Text}
if showtext then begin
Hi_text = Text_new(Date,time-text_displace ,Plot_hi ,numtostr(Plot_hi,decimals));
Lo_text = Text_new(Date,time-text_displace,Plot_lo ,numtostr(Plot_lo,decimals));
end;
end;
{DayOfWeek filter}
If dayofweek(date) = 4 then Trade_flag = false;
{Volatility condition filter}
If range[1]data2 > (avgtruerange(5)data2 * 1.6) then Trade_Flag = false;
end;
{Entries}
If Trade_Flag and time > open_range_time and time < endtime then begin
if marketposition = 0 then begin
Buy("Long") n contracts next bar at (Plot_hi + 1) stop;
SellShort("Short") n contracts next bar at (Plot_lo - 1) stop;
end;
end;
{Exits & Stops}
if marketposition <> 0 then begin
Trade_flag = false;
end;
{Short Exits}
if marketposition = -1 then begin
if time = Endtime then buytocover("Time") all contracts next bar at open;
Buytocover ("Stop") all contracts next bar at Plot_hi stop;
end;
{Long Exits}
If marketposition = 1 then begin
Sell (" Stop") all contracts next bar at Plot_lo stop;
if time = Endtime then sell(" Time") all contracts next bar at open;
end;
{E & OE}
of: http://www.online-futurestrading.com/im ... koutv2.txt
Alvast bedankt!
P.S. de trading rules zijn terug te vinden op: http://www.online-futurestrading.com/ex ... system.htm