Onderstaande code geeft een foutmelding bij
if DTRIX crosses over 0 then buy("EL1")next bar at open;
In de vorige versie van vestics werkte dit wel.
Wie weet een oplossing hiervoor ?
{*******************************************************************
Description: DynamicTRIX system
Provided By: BTAC (c) Copyright 2003
********************************************************************}
Input: length1(21),length2(21),Length3(21);
Variables: ?EMA1(0), EMA2(0), EMA3(0);
Variables: DTRIX(0), TL(0);
EMA1 = Xaverage(c, length1);
EMA2 = Xaverage(EMA1, length2);
EMA3 = Xaverage(EMA2, length3);
DTRIX = iff(EMA3[1]<>0, ((EMA3-EMA3[1])/EMA3[1])*100,1);
{iff functie gebruiken om te voorkomen dat nominator=0}
TL = XAverage(DTRIX,5);
{if DTRIX crosses over 0 then buy("EL1")next bar at open;
If DTRIX crosses under 0 then sell("ES1") ?next bar at open;}
{2e set handelsregels, waarbij TriggerLine ingezet wordt}
if DTRIX crosses over 0 then buy("EL1")next bar at open;
if DTRIX>0 and DTRIX crosses under TL then exitlong("XL") next bar at open;
if DTRIX>0 and DTRIX crosses over TL then buy ("EL2")next bar at open;
If DTRIX crosses under 0 then sell("ES1") ?next bar at open;
if DTRIX<0 and DTRIX crosses over TL then exitshort ("XS")next bar at open;
if DTRIX<0 and DTRIX crosses under TL then sell("ES2") next bar at open;
Vr. Gr.