entries and exits

Vragen en suggesties over handelssystemen en indicatoren

Moderator: Perry

entries and exits

Berichtdoor Paul M » wo 18 jun 2003, 22:40

Ik heb een poging gedaan het onderstaande artikel om te zetten in Vesticode.
http://www.tradingpulse.com/downloads/evaluat.pdf.
Ik sta open voor verbeteringen en/of aanvullingen.
Invoegen onder report

value function zEfficiencyReport () begin

? ?{--- variables ---}
value xEntryEfL=0,xExitEfL=0,xTotalEfL=0,xEntryEfS=0,xExitEfS=0,xTotalEfS=0,
? ? ?xExitdate,xProfit[],xM,xExit,xEntry,xMP;


?{--- initialise ---}
?
value ?xCurrentBar,xBars,xdate,xContracts;
?xdate=date;
?xCurrentBar := CurrentBar;
?xBars := BarsSinceEntry(1)-BarsSinceExit(1);
?xExitdate:=ExitDate(1)-19000000 ;
?xProfit := PositionProfit(1);
?xEntry:=Entryprice(1);
?xM=totaltrades;
?xMP:=marketposition(1);
?xContracts:=Currentcontracts[1];
?{---Get Highest and Lowest close---}
value xLowestMinClose[],xHighestMaxClose[],xMinPrice,xMinCl=close,xMaxCl=close,xStartbar;

xStartbar:=BarsSinceEntry(0); ?

{---Highest Close Lowest Close---}
if xDate>xDate[1] then begin ?
? if close<xMinCl[1] then xMinCl=close
? ?else xMinCl=xMinCl[1];
? if close>xMaxCl[1] then xMaxCl=close
? ?else xMaxCl=xMaxCl[1];
end;
{---Highest Close Lowest Close xBars---}
?if xDate=xExitdate then begin
?xExit=close;
?xHighestMaxClose=Highest(xMaxCl,xBars);
?if xExit>xHighestMaxClose then xHighestMaxClose=xExit else xHighestMaxClose = xHighestMaxClose;
?xLowestMinClose=Lowest(xMinCl,xBars);
?if xExit<xLowestMinClose then xLowestMinClose=xExit else xLowestMinClose = xLowestMinClose;
?xMinPrice=xHighestMaxClose-xLowestMinClose;
?
end;

{---Effiency Long---}
if xMP=1 then begin
xEntryEfS=0;
xExitEfS=0;
xTotalEfS=0;

?xEntryEfL:=((xHighestMaxClose-xEntry)/(xMinPrice)*100;
?xExitEfL:=((xExit-xLowestMinClose)/(xMinPrice)*100;
?xTotalEfL:=((xProfit/xContracts)/xMinPrice)*100;
?
end;
{---Effiency Short---}
if xMP=-1 then begin
xEntryEfL=0;
xExitEfL=0;
xTotalEfL=0;
?
?xEntryEfS:=((xEntry-xLowestMinClose)/(xMinPrice)*100;
?xExitEfS:=((xHighestMaxClose-xExit)/(xMinPrice)*100;
?xTotalEfS:=((xProfit/xContracts)/xMinPrice)*100;
end;
{---Optellen en Average berekenen---}
value xSumEntryL=0,xSumEntryS=0,xSumExitL=0,xSumExitS=0,xSumTotL=0,xSumTotS=0,xSumEntry=0,xSumExit=0,xSumTot=0,
xAvgEntry=0,xAvgExit=0,xAvgTot=0;
if xMP=1 then begin
xSumEntryS:=0;
xSumExitS:=0;
xSumTotS:=0;
xSumEntryL:=xSumEntryL+xEntryEfL;
xSumExitL:=xSumExitL+xExitEfL;
xSumTotL:=xSumTotL+xTotalEfL;
end;

if xMP=-1 then begin
xSumEntryL:=0;
xSumExitL:=0;
xSumTotL:=0;
xSumEntryS:=xSumEntryS+xEntryEfS;
xSumExitS:=xSumExitS+xExitEfS;
xSumTotS:=xSumTotS+xTotalEfS;
end;
if xM>xM[1] then begin
xSumEntry:=xSumEntry+(xSumEntryL+xSumEntryS);
xSumExit:=xSumExit+(xSumExitL+xSumExitS);
xSumTot:=xSumTot+(xSumTotL+xSumTotS);
xAvgExit:=xSumExit/xM;
xAvgEntry:=xSumEntry/xM;
xAvgTot:=xSumTot/xM;
end;
{---Reset xMinCl and xMaxClose---}
if xStartbar=0 then begin
?xMinCl=close;
?XMaxCl=close;
end;
end;


if xM<>xM[1] then begin
{---- print the performance summary ----}
? ?if xMP=1 then begin
? ?print("LongTrades",xM:5:0);
? ?print("Entry Efficiency ?",xEntryEfL:5:1, ?"% &#0124; Total Efficiency ?",xTotalEfL:5:1,"%");
? ?print("Exit Efficiency ? ",xExitEfL:5:1,"%");
? ?end;
? ?if xMP=-1 then begin
? ?print("ShortTrades",xM:5:0);
? ?print("Entry Efficiency ?",xEntryEfS:5:1, ?"% &#0124; Total Efficiency ?",xTotalEfS:5:1,"%");
? ?print("Exit Efficiency ? ",xExitEfS:5:1,"%");
end;
end;
if xCurrentbar=vlastbar then begin
? ?print("TotalTrades",xM:5:0);
? ?print("Average Entry Efficiency ?",xAvgEntry:5:1, ?"% &#0124; Average Total Efficiency ?",xAvgTot:5:1,"%");
? ?print("Average Exit Efficiency ? ",xAvgExit:5:1,"%"); ? ?
end;

Groetjes Paul


(Edited by Paul M at 3:17 pm op 21,juni 2003)
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21

entries and exits

Berichtdoor Joop Henzen » do 19 jun 2003, 8:34

Dag Paul

Bij controle bleek, dat 2 maal ''then'' moest worden toegevoegd. Het report laat echter bijna uitsluitend blubber zien. Werkt het bij jou wel ???


groet


Joop
Joop Henzen
 
Berichten: 215
Geregistreerd op: ma 30 dec 2002, 14:21
Woonplaats: Bussum

entries and exits

Berichtdoor Paul M » do 19 jun 2003, 9:03

Dag Joop,

Bij mij doet hij het.
Misschien via edit kopieeren.

Groetjes Paul

ps. Als hij het niet zou doen zou ik hem er niet opzetten.

(Edited by Paul M at 10:05 am op 19,juni 2003)
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21

entries and exits

Berichtdoor Joop Henzen » do 19 jun 2003, 12:48

Heb via edit gepasted ( is dat nederlands gebruik )
Dus via knippen geplakt

Gek dat ik 2 foutboodschappen kreeg

Hoe dan ook, veel succes met de eventuele verdere uitbouw

Groet

Joop
Joop Henzen
 
Berichten: 215
Geregistreerd op: ma 30 dec 2002, 14:21
Woonplaats: Bussum

entries and exits

Berichtdoor poekmeister » za 21 jun 2003, 20:20

Paul,
Interessant artikel! Ze hebben trouwens nog meer interessante artikelen die je kan downloaden. Ik neem aan dat jij dat ook al gedaan hebt. ;-)

Ik heb je code ge-cut en past-ed als nieuw report, maar ik krijg bij alle getallen _NA als uitkomst. Enig idee hoe dat kan komen???


Michel

(Edited by poekmeister at 9:22 pm op 21,juni 2003)
poekmeister
 
Berichten: 88
Geregistreerd op: za 17 aug 2002, 19:50

entries and exits

Berichtdoor Paul M » za 21 jun 2003, 20:35

je moet hem als laatste toevoegen.

Groetjes Paul
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21

entries and exits

Berichtdoor Paul M » ma 23 jun 2003, 12:21

value function zEfficiencyReport () begin

? ? {--- variables ---}
value xEntryEfL=0,xExitEfL=0,xTotalEfL=0,xEntryEfS=0,xExitEfS=0,xTotalEfS=0,
? ? ?xExitdate,xProfit[],xM,xExit,xEntry,xMP;


?{--- initialise ---}
?
value ?xCurrentBar,xBars,xdate;
?xdate=date;
?xCurrentBar := CurrentBar;
?xBars := BarsSinceEntry(1)-BarsSinceExit(1);
?xExitdate:=ExitDate(1)-19000000 ;
?xProfit := PositionProfit(1);
?xEntry:=Entryprice(1);
?xM=totaltrades;
?xMP:=marketposition(1);

?{---Get Highest High and Lowest Low---}
value xLowestMinLow[],xHighestMaxHigh[],xMinPrice,xMinLow=Low,xMaxHigh=High,xStartbar,xRunUp,xMAE;

xStartbar:=BarsSinceEntry(0); ?

{---Highest High Lowest Low---}
if xDate>xDate[1] then begin ?
? if low<xMinLow[1] then xMinLow=low
? ?else xMinLow=xMinLow[1];
? if high>xMaxHigh[1] then xMaxHigh=high
? ?else xMaxHigh=xMaxHigh[1];
end;
{---Highest High Lowest Low xBars---}
?if xDate=xExitdate then begin
?xExit=close;
?xHighestMaxHigh=Highest(xMaxHigh,xBars);
?if xExit>xHighestMaxHigh then xHighestMaxHigh=xExit else xHighestMaxHigh = xHighestMaxHigh;
?xLowestMinLow=Lowest(xMinLow,xBars);
?if xExit<xLowestMinLow then xLowestMinLow=xExit else xLowestMinLow = xLowestMinLow;
?xMinPrice=xHighestMaxHigh-xLowestMinLow;
?
end;

{---Effiency Long---}
if xMP=1 then begin
xEntryEfS=0;
xExitEfS=0;
xTotalEfS=0;

?xEntryEfL:=((xHighestMaxHigh-xEntry)/(xMinPrice)*100;
?xExitEfL:=((xExit-xLowestMinLow)/(xMinPrice)*100;
?xTotalEfL:=(xProfit/(xMinPrice)*100;
?If xHighestMaxHigh >= EntryPrice(1) Then xRunUp = (xHighestMaxHigh-EntryPrice(1))/EntryPrice(1)*100 else xRunUp = 0;
?if xLowestMinLow<=Entryprice(1) Then xMAE= (EntryPrice(1)-xLowestMinLow)/EntryPrice(1)*100 else xMAE = 0;
end;
{---Effiency Short---}
if xMP=-1 then begin
xEntryEfL=0;
xExitEfL=0;
xTotalEfL=0;
?
?xEntryEfS:=((xEntry-xLowestMinLow)/(xMinPrice)*100;
?xExitEfS:=((xHighestMaxHigh-xExit)/(xMinPrice)*100;
?xTotalEfS:=(xProfit/(xMinPrice)*100;
?If xLowestMinLow <= EntryPrice(1) Then xRunUp = (EntryPrice(1)-xLowestMinLow)/EntryPrice(1)*100 else xRunUp = 0;
?if xHighestMaxHigh >= EntryPrice(1) Then xMAE= (xHighestMaxHigh-EntryPrice(1))/EntryPrice(1)*100 else xMAE = 0;
end;
{---Optellen en Average berekenen---}
value xSumEntryL=0,xSumEntryS=0,xSumExitL=0,xSumExitS=0,xSumTotL=0,xSumTotS=0,xSumEntry=0,xSumExit=0,xSumTot=0,
xAvgEntry=0,xAvgExit=0,xAvgTot=0;
if xMP=1 then begin
xSumEntryS:=0;
xSumExitS:=0;
xSumTotS:=0;
xSumEntryL:=xSumEntryL+xEntryEfL;
xSumExitL:=xSumExitL+xExitEfL;
xSumTotL:=xSumTotL+xTotalEfL;

end;

if xMP=-1 then begin
xSumEntryL:=0;
xSumExitL:=0;
xSumTotL:=0;
xSumEntryS:=xSumEntryS+xEntryEfS;
xSumExitS:=xSumExitS+xExitEfS;
xSumTotS:=xSumTotS+xTotalEfS;
end;
if xM>xM[1] then begin
xSumEntry:=xSumEntry+(xSumEntryL+xSumEntryS);
xSumExit:=xSumExit+(xSumExitL+xSumExitS);
xSumTot:=xSumTot+(xSumTotL+xSumTotS);
xAvgExit:=xSumExit/xM;
xAvgEntry:=xSumEntry/xM;
xAvgTot:=xSumTot/xM;

end;
{---Reset xMinCl and xMaxClose---}
if xStartbar=0 then begin
?xMinLow=Low;
?XMaxHigh=High;
end;
end;
end;

if xM<>xM[1] then begin
{---- print the performance summary ----}
? ?if xMP=1 then begin
? ?print("LongTrades ? ? ? ?",xM:5:0);
? ?print("EntryPrice ? ? ? ?",xEntry:5:2, ? ? ?" &#0124; ExitPrice ? ? ? ? ",xExit:5:2,"&#0124; Highest Price ",xHighestMaxHigh:5:2,"&#0124; Lowest Price ",xLowestMinLow:5:2,);
? ?print("Entry Efficiency ?",xEntryEfL:5:1, ?"% &#0124; Total Efficiency ?",xTotalEfL:5:1,"%");
? ?print("Exit Efficiency ? ",xExitEfL:5:1,"%");
? ?print("RunUp ? ? ? ? ? ? ",xRunUp:5:1, ? ? "% &#0124; MAE ? ? ? ? ? ? ? ",xMAE:5:1,"%");
? ?print ("");
? ?end;
? ?if xMP=-1 then begin
? ?print("ShortTrades ? ? ? ",xM:5:0);
? ?print("EntryPrice ? ? ? ?",xEntry:5:2, ? ? ?" &#0124; ExitPrice ? ? ? ? ",xExit:5:2,"&#0124; Highest Price ",xHighestMaxHigh:5:2,"&#0124; Lowest Price ",xLowestMinLow:5:2,);
? ?print("Entry Efficiency ?",xEntryEfS:5:1, ?"% &#0124; Total Efficiency ?",xTotalEfS:5:1,"%");
? ?print("Exit Efficiency ? ",xExitEfS:5:1, ? "%");
? ?print("RunUp ? ? ? ? ? ? ",xRunUp:5:1, ? ? "% &#0124; MAE ? ? ? ? ? ? ? ",xMAE:5:1,"%");
? ?print ("");
end;
end;
if xCurrentbar=vlastbar then begin
? ?print("TotalTrades",xM:5:0);
? ?print("Average Entry Efficiency ?",xAvgEntry:5:1, ?"% &#0124; Average Total Efficiency ?",xAvgTot:5:1,"%");
? ?print("Average Exit Efficiency ? ",xAvgExit:5:1,"%");
? ?
end;

Vr. Groet,
Paul

(Edited by Paul M at 1:23 pm op 23,juni 2003)
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21

entries and exits

Berichtdoor hetvosje » wo 25 jun 2003, 10:39

Beste Paul,
Ik heb ook geprobeerd om dat report tevoorschijn te toveren, maar hij stopt bij if low ? else. Bij mijn weten moet daar iets komen van > of < o.i.d.
is er iets vergeten?
hetvosje
 
Berichten: 10
Geregistreerd op: za 09 feb 2002, 20:35

entries and exits

Berichtdoor Paul M » wo 25 jun 2003, 10:52

Via Edit de tekst kopieeren, hij wordt niet helemaal weergegeven.

Groetjes Paul
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21

entries and exits

Berichtdoor Paul M » za 13 sep 2003, 21:48

value function zeEffTotReport () begin

? ?{--- variables ---}
value xEntryEfL=0,xExitEfL=0,xTotalEfL=0,xEntryEfS=0,xExitEfS=0,xTotalEfS=0,
? ? ?xExitdate,xProfit,xM,xExit,xEntry,xMP,xContracts;


?{--- initialise ---}
?
value ?xCurrentBar,xBars,xdate;
?xdate=date;
?xCurrentBar := CurrentBar;
?xBars := BarsSinceEntry(1)-BarsSinceExit(1);
?xExitdate:=ExitDate(1)-19000000 ;
?xProfit := PositionProfit(1);
?xEntry:=Entryprice(1);
?xM=totaltrades;
?xMP:=marketposition(1);
?xContracts:=Absvalue(currentcontracts[1]);
?{---Get Highest and Lowest close---}
value xLowestMinLow[],xHighestMaxHigh[],xMinPrice,xMinLow=Low,xMaxHigh=High,xStartbar,xRunUp,xMAE;

xStartbar:=BarsSinceEntry(0); ?

{---Highest Close Lowest Close---}
if xDate>xDate[1] then begin ?
? if low<xMinLow[1] then xMinLow=low
? ?else xMinLow=xMinLow[1];
? if high>xMaxHigh[1] then xMaxHigh=high
? ?else xMaxHigh=xMaxHigh[1];
end;
{---Highest Close Lowest Close xBars---}
?if xDate=xExitdate then begin
?xExit=close;
?xHighestMaxHigh=Highest(xMaxHigh,xBars);
?if xExit>xHighestMaxHigh then xHighestMaxHigh=xExit else xHighestMaxHigh = xHighestMaxHigh;
?xLowestMinLow=Lowest(xMinLow,xBars);
?if xExit<xLowestMinLow then xLowestMinLow=xExit else xLowestMinLow = xLowestMinLow;
?if xEntry<xLowestMinLow then xLowestMinLow=xEntry else xLowestMinLow = xLowestMinLow;
?xMinPrice=xHighestMaxHigh-xLowestMinLow;
?
end;

value xSumEntry[]=0,xSumExit[]=0,xTotal[]=0,
? ? ?xAvgEntry[]=0,xAvgExit[]=0,xAvgTot[]=0;
{---Effiency Long---}
if xMP=1 then begin
xEntryEfS=0;
xExitEfS=0;
? xEntryEfL:=((xHighestMaxHigh-xEntry)/(xMinPrice)*100;
? xExitEfL:=((xExit-xLowestMinLow)/(xMinPrice)*100;
?
?If xHighestMaxHigh >= EntryPrice(1) Then xRunUp = (xHighestMaxHigh-EntryPrice(1))/EntryPrice(1)*100 else xRunUp = 0;
?if xLowestMinLow<=Entryprice(1) Then xMAE= (EntryPrice(1)-xLowestMinLow)/EntryPrice(1)*100 else xMAE = 0;
? ?{---Optellen ---}
end; ?
?
{---Effiency Short---}
if xMP=-1 then begin
xEntryEfL=0;
xExitEfL=0;

?xEntryEfS:=((xEntry-xLowestMinLow)/(xMinPrice)*100;
?xExitEfS:=((xHighestMaxHigh-xExit)/(xMinPrice)*100;
?
?If xLowestMinLow <= EntryPrice(1) Then xRunUp = (EntryPrice(1)-xLowestMinLow)/EntryPrice(1)*100 else xRunUp = 0;
?if xHighestMaxHigh >= EntryPrice(1) Then xMAE= (xHighestMaxHigh-EntryPrice(1))/EntryPrice(1)*100 else xMAE = 0;
end;
?{---Optellen ---}
if xDate=xExitdate then begin
if xMP=1 then xTotalEfL:=((xProfit/xContracts)/xMinPrice)*100;
if xMP=-1 then xTotalEfS:=((xProfit/xContracts)/xMinPrice)*100;
end else begin
xTotalEfL=0;
xTotalEfS=0;

end;

if currentbar=1 then begin
xSumEntry:=0;
xSumExit:=0;
xTotal:=0;
xAvgExit:=0;
xAvgEntry:=0;
xAvgTot:=0;

end else begin

xSumEntry:=xSumEntry[1]+(xEntryEfS+xEntryEfL);
xSumExit:=xSumExit[1]+(xExitEfS+xExitEfL);
xTotal:=xTotal[1]+(xTotalEfS+xTotalEfL);

xAvgExit:=xSumExit/xM;
xAvgEntry:=xSumEntry/xM;
xAvgTot:=xTotal/xM;

if xSumEntry=_NA then xSumEntry=xSumEntry[1];
if xSumExit=_NA then xSumExit=xSumExit[1];
if xTotal=_NA then xTotal=xTotal[1];
if xAvgExit=_NA then xAvgExit=xAvgExit[1];
if xAvgEntry=_NA then xAvgEntry=xAvgEntry[1];
if xAvgTot=_NA then xAvgTot=xAvgTot[1];
end;

{---Reset xMinCl and xMaxClose---}
if xStartbar=0 then begin
?xMinLow=Low;
?XMaxHigh=High;
end;

if xCurrentbar=vlastbar then begin
? ?print("TotalTrades",xM:5:0);
? ?print("Average Entry Efficiency ?",xAvgEntry:5:1, ?"% &#0124; Average Total Efficiency ?",xAvgTot:5:1,"%");
? ?print("Average Exit Efficiency ? ",xAvgExit:5:1,"%");
end; ? ?
end;

Paul
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21

entries and exits

Berichtdoor Joop Henzen » za 13 sep 2003, 22:03

Dag Paul

wat betekent je laatste post ?

is dit iets nieuws of een correctie op iets wat bij anderen en ook bij mij niet werkte.

geef eens wat meer informatie want dit is gewoon iets erop gooien zonder enige vorm van communicatie.

groet


Joop Henzen
Joop Henzen
 
Berichten: 215
Geregistreerd op: ma 30 dec 2002, 14:21
Woonplaats: Bussum

entries and exits

Berichtdoor Paul M » zo 14 sep 2003, 0:02

Beste Joop,

Dit is een correctie op het bovenstaande verhaal, het -optel- gedeelte werkte niet, volgens mij nu wel.
Ik dacht ik zet het erop voor een ieder die het interessant vindt. Meer informatie op http://www.tradingpulse.com -Recourse Center-Media Center-Evaluating System Efficiency.


Paul
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21

entries and exits

Berichtdoor Joop Henzen » zo 14 sep 2003, 12:26

bedankt voor de uitleg Paul

echter, het werkt niet
er werden 3 fouten gesignaleerd THEN ?THEN ? en ? =

hieronder mijn gecorrigeerde versie

weet jij wat er niet klopt

ik kreeg slechts 3 regels met aantal trades en zero zero

value function zEfficiencyReport () begin

? {--- variables ---}
value xEntryEfL=0,xExitEfL=0,xTotalEfL=0,xEntryEfS=0,xExitEfS=0,xTotalEfS=0,
? ? xExitdate,xProfit,xM,xExit,xEntry,xMP,xContracts;


{--- initialise ---}
?
value ?xCurrentBar,xBars,xdate;
xdate=date;
xCurrentBar := CurrentBar;
xBars := BarsSinceEntry(1)-BarsSinceExit(1);
xExitdate:=ExitDate(1)-19000000 ;
xProfit := PositionProfit(1);
xEntry:=Entryprice(1);
xM=totaltrades;
xMP:=marketposition(1);
xContracts:=Absvalue(currentcontracts[1]);
{---Get Highest and Lowest close---}
value xLowestMinLow[],xHighestMaxHigh[],xMinPrice,xMinLow=Low,xMaxHigh=High,xStartbar,xRunUp,xMAE;

xStartbar:=BarsSinceEntry(0); ?

{---Highest Close Lowest Close---}
if xDate>xDate[1] then begin ?
?if low ? ?then xMinLow=xMinLow[1];
?if high>xMaxHigh[1] then xMaxHigh=high
? else xMaxHigh=xMaxHigh[1];
end;
{---Highest Close Lowest Close xBars---}
if xDate=xExitdate then begin
xExit=close;
xHighestMaxHigh=Highest(xMaxHigh,xBars);
if xExit>xHighestMaxHigh then xHighestMaxHigh=xExit else xHighestMaxHigh = xHighestMaxHigh;
xLowestMinLow=Lowest(xMinLow,xBars);
if xExit ?then xEntry = xMinPrice=xHighestMaxHigh-xLowestMinLow;
?
end;

value xSumEntry[]=0,xSumExit[]=0,xTotal[]=0,
? ? xAvgEntry[]=0,xAvgExit[]=0,xAvgTot[]=0;
{---Effiency Long---}
if xMP=1 then begin
xEntryEfS=0;
xExitEfS=0;
?xEntryEfL:=((xHighestMaxHigh-xEntry)/(xMinPrice)*100;
?xExitEfL:=((xExit-xLowestMinLow)/(xMinPrice)*100;
?
If xHighestMaxHigh >= EntryPrice(1) Then xRunUp = (xHighestMaxHigh-EntryPrice(1))/EntryPrice(1)*100 else xRunUp = 0;
if xLowestMinLow<=Entryprice(1) Then xMAE= (EntryPrice(1)-xLowestMinLow)/EntryPrice(1)*100 else xMAE = 0;
? {---Optellen ---}
end; ?
?
{---Effiency Short---}
if xMP=-1 then begin
xEntryEfL=0;
xExitEfL=0;

xEntryEfS:=((xEntry-xLowestMinLow)/(xMinPrice)*100;
xExitEfS:=((xHighestMaxHigh-xExit)/(xMinPrice)*100;
?
If xLowestMinLow <= EntryPrice(1) Then xRunUp = (EntryPrice(1)-xLowestMinLow)/EntryPrice(1)*100 else xRunUp = 0;
if xHighestMaxHigh >= EntryPrice(1) Then xMAE= (xHighestMaxHigh-EntryPrice(1))/EntryPrice(1)*100 else xMAE = 0;
end;
{---Optellen ---}
if xDate=xExitdate then begin
if xMP=1 then xTotalEfL:=((xProfit/xContracts)/xMinPrice)*100;
if xMP=-1 then xTotalEfS:=((xProfit/xContracts)/xMinPrice)*100;
end else begin
xTotalEfL=0;
xTotalEfS=0;

end;

if currentbar=1 then begin
xSumEntry:=0;
xSumExit:=0;
xTotal:=0;
xAvgExit:=0;
xAvgEntry:=0;
xAvgTot:=0;

end else begin

xSumEntry:=xSumEntry[1]+(xEntryEfS+xEntryEfL);
xSumExit:=xSumExit[1]+(xExitEfS+xExitEfL);
xTotal:=xTotal[1]+(xTotalEfS+xTotalEfL);

xAvgExit:=xSumExit/xM;
xAvgEntry:=xSumEntry/xM;
xAvgTot:=xTotal/xM;

if xSumEntry=_NA then xSumEntry=xSumEntry[1];
if xSumExit=_NA then xSumExit=xSumExit[1];
if xTotal=_NA then xTotal=xTotal[1];
if xAvgExit=_NA then xAvgExit=xAvgExit[1];
if xAvgEntry=_NA then xAvgEntry=xAvgEntry[1];
if xAvgTot=_NA then xAvgTot=xAvgTot[1];
end;

{---Reset xMinCl and xMaxClose---}
if xStartbar=0 then begin
xMinLow=Low;
XMaxHigh=High;
end;

if xCurrentbar=vlastbar then begin
? print("TotalTrades",xM:5:0);
? print("Average Entry Efficiency ?",xAvgEntry:5:1, ?"% &#0124; Average Total Efficiency ?",xAvgTot:5:1,"%");
? print("Average Exit Efficiency ? ",xAvgExit:5:1,"%");
end; ? ?
end;


groet



Joop
Joop Henzen
 
Berichten: 215
Geregistreerd op: ma 30 dec 2002, 14:21
Woonplaats: Bussum

entries and exits

Berichtdoor Paul M » zo 14 sep 2003, 16:08

Beste Joop,

Als je code's van het forum haalt kun je dit het beste doen via edit. Had je dit gedaan dan was de code correct geweest. De code's worden soms niet goed weergegeven, ik denk een foutje ?in het programma Vestics forum. Dit probleem heb je dus niet als je hem via edit binnenhaalt. Maar hij doet het dus nu wel begrijp ik?
Succes.

Paul

(Edited by Paul M at 5:09 pm op 14,sept. 2003)


(Edited by Paul M at 5:10 pm op 14,sept. 2003)
Paul M
 
Berichten: 263
Geregistreerd op: vr 13 dec 2002, 23:21

entries and exits

Berichtdoor Joop Henzen » ma 15 sep 2003, 7:32

Hallo Paul

Ik heb het via edit/paste gedaan en vervolgens kreeg ik de vermelde 3 fouten.
Echter : ik was denk ik niet helemaal duidelijk maar ik krijg na de correcties geen resultaten.
Krijg jij die met mijn versie die ik toezond wel ?


groet



Joop
Joop Henzen
 
Berichten: 215
Geregistreerd op: ma 30 dec 2002, 14:21
Woonplaats: Bussum

Volgende

Keer terug naar Handelssystemen + Indicatoren

Wie is er online

Gebruikers op dit forum: Geen geregistreerde gebruikers en 31 gasten

cron