Welche Version verwendest du?
Das aktiviert sich also dann, wenn NICHT 'all quotations' im AA ausgewählt ist.
Abgesehen davon das mein Englisch wo Du natürlich nichts dafür kannst sehr schlecht ist bringt mir der Text aus der Hilfe nichts wirkliches was auf mein Problem hinweist.
Die hatte ich auch schon gelesen bevor Du Sie mir freundlicher weise hier posteste.
Hätte ja sein können das jemand noch mehr drüber weis.
Wenn ich den Text Richtig verstehe ist es ja nur so das er nicht auf alle Daten die Berechnungen macht sondern nur auf die die im Chart angezeigt werden, also nur auf einen begrenzten Zeitraum.
Quoted
Was sind denn das für andere Arrows (hohl innen) in deinem Chart?
Wenn Du den Scanner durchlaufen lässt und dann auf einen Wert doppel Klicks erscheinen Sie.
hmmm,
weiss einer was das " Use QuickAFL " in den Settings bedeutet?
Wenn ich das anklicke erscheint der Wert nicht, mache ich das Häkchen weck erscheint er wieder im Scanner.
Da müßte man halt mal die Hilfe zu Rate ziehen, dann wüßte man es (siehe unten).
Bei mir wird weder mit also auch ohne Quick AFL ein Short angezeigt. Was sind denn das für andere Arrows (hohl innen) in deinem Chart? Die sind in dem Code nicht drinnen und müßten ja auch durch irgend eine Anweisung erzeugt werden. Genau diese, da ja auch in der letzten Tagescandle vorhanden, werden dein Shortsignal erzeugen. Und worauf diese sich beziehen, weiß ich nicht, da sie im geposteten Code nicht vorhanden sind.
Quoted
Was sind denn das für andere Arrows (hohl innen) in deinem Chart?
hmmm,
weiss einer was das " Use QuickAFL " in den Settings bedeutet?
Wenn ich das anklicke erscheint der Wert nicht, mache ich das Häkchen weck erscheint er wieder im Scanner.
Wenn du einen anderen Code reinstellst, als den, den du für den Chart verwendest, kann ich dir nichts dazu sagen. Wenn ich den aus deinem letzten Posting verwende, dann wird bei mir für COF kein Short(-Arrow) für 28.10. angezeigt. Habe allerdings deinen Code nicht auf sonstige Fehler untersucht. Dafür fehlt mir gerade die Motivation.
EDIT: Die Doppelslashes habe ich natürlich vorher weggemacht. Auch das AA zeigt keinen Short an.
Quoted
Die Doppelslashes habe ich natürlich vorher weggemacht.
|
|
Source code |
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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
function Swing_Low()
{
return ValueWhen(
(L>Ref(L,-1) AND Ref(L==LowestSince(L<Ref(L,-1),L,1),-1))
,Ref(L,-1),1) ;
}
function Swing_High()
{
return ValueWhen(
(H<Ref(H,-1) AND Ref(H==HighestSince(H>Ref(H,-1),H,1),-1))
,Ref(H,-1),1);
}
// pot. Swing Highs, Lows
SH=Swing_High();
SL=Swing_Low() ;
SL= IIf(SL!=Ref(SL,1),Ref(SL,1),Null);
SH= IIf(SH!=Ref(SH,1),Ref(SH,1),Null);
SLR=Null; //reale Werte (wenn sie feststehen)
SHR=Null;
// inside Bars kontrollieren
for ( i = 1; i < BarCount ; i++ )
{
if (Nz(SL[i])>0)
{
k=i+1;
while (k<BarCount AND (H[k]<H[i] AND L[k]>L[i]))
{
SH[k]=0;
SL[k]=0;
k++ ; // inside-Bars weg
}
if (k==BarCount)
SL[i]=Null;
else
{
if (NOT(H[k]>H[i]) AND NOT(L[k]>L[i])) SL[i]=Null; // doch kein Swing
else SLR[k]=SL[i];
}
}
if (Nz(SH[i])>0)
{
k=i+1;
while (k<BarCount AND (H[k]<H[i] AND L[k]>L[i]))
{
SH[k]=0;
SL[k]=0;
k++; // inside-Bars weg
}
if (k==BarCount)
SH[i]=Null;
else
{
if (NOT(H[k]<H[i]) AND NOT(L[k]<L[i])) SH[i]=Null;
else SHR[k]=SH[i];
}
}
}
// outsidebars kontrollieren
SLF=0;
SHF=0;
for (i=0;i<BarCount;i++)
{
if (SLR[i]>0 )
{
if (SLF==1 AND H[i-1]>H[i-2]) SHR[i]=H[i-1]; // outsidebar
SLF=1;
SHF=0;
}
if (SHR[i]>0 )
{
if (SHF==1 AND L[i-1]<L[i-2]) SLR[i]=L[i-1];
SLF=0;
SHF=1;
}
}
SLF=0;
SHF=0;
dist = .41 * ATR( 10 );
for (i=0;i<BarCount;i++)
{
if (SL[i]>0 )
{
if (SLF==0) PlotText( "SL",i, SL[ i ]- dist[i],colorGreen,colorYellow );
else PlotText( "SL",i, SL[ i ]- dist[i],colorRed,colorYellow );
SLF=1;
SHF=0;
}
if (SH[i]>0 )
{
if (SHF==0) PlotText( "SH",i, SH[ i ]+ dist[i],colorGreen,colorYellow );
else PlotText( "SH",i, SH[ i ]+ dist[i],colorRed,colorYellow );
SLF=0;
SHF=1;
}
}
dt = DateTime();
shdt = ValueWhen(sh, dt);
sldt = ValueWhen(sl, dt);
shh = ValueWhen(sh, H);
sll = ValueWhen(sl, L);
upline = IIf( shdt > sldt, shh - (shh-sll) * 0.618, Null);
dnline = IIf( sldt > shdt, sll + (shh-sll) * 0.618, Null);
Lastup = LastValue(upline);
Lastdn = LastValue(dnline);
whatline = IIf(Lastup > Lastdn, Lastup, Lastdn);
Colline = IIf(Lastup > Lastdn, colorBrightGreen, colorRed);
nshh = ValueWhen(H > Ref(H,-1), H);
stoppuptrend = nshh- (nshh-Ref(sll,-1)) * 0.618;
nsll = ValueWhen(L < Ref(L,-1),L);
stoppdntrend = nsll + (Ref(shh,-1)- nsll) * 0.618;
uptrend = Flip(shdt > sldt,C< stoppuptrend);
dntrend = Flip(sldt > shdt,C> stoppdntrend);
//Plot(whatline, "", Colline, styleDashed);
Buy = H<Ref(H,-1) AND H != shh AND Lastup > Lastdn AND C > whatline AND uptrend;
Short = L>Ref(L,-1) AND L != sll AND Lastup < Lastdn AND C < whatline AND dntrend;
//Plot(uptrend ,"",colorBlue,4);
//Plot(dntrend ,"",colorBlack,4);
Plot(nshh,"",colorYellow);
//Plot(Ref(stoppuptrend,-1),"",colorBlue,4);
Plot(stoppuptrend,"",colorBlue,4);
Plot(nsll,"",colorYellow);
Plot(stoppdntrend,"",colorGreen,4);
//PlotShapes(shapeSmallUpTriangle*Buy,colorLime,0,Low-0.5*ATR(1));
//PlotShapes(shapeSmallDownTriangle*Short,colorRed,0,High+0.5*ATR(1));
|
|
|
Source code |
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 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
function Swing_Low()
{
return ValueWhen(
(L>Ref(L,-1) AND Ref(L==LowestSince(L<Ref(L,-1),L,1),-1))
,Ref(L,-1),1) ;
}
function Swing_High()
{
return ValueWhen(
(H<Ref(H,-1) AND Ref(H==HighestSince(H>Ref(H,-1),H,1),-1))
,Ref(H,-1),1);
}
// pot. Swing Highs, Lows
SH=Swing_High();
SL=Swing_Low() ;
SL= IIf(SL!=Ref(SL,1),Ref(SL,1),Null);
SH= IIf(SH!=Ref(SH,1),Ref(SH,1),Null);
SLR=Null; //reale Werte (wenn sie feststehen)
SHR=Null;
// inside Bars kontrollieren
for ( i = 1; i < BarCount ; i++ )
{
if (Nz(SL[i])>0)
{
k=i+1;
while (k<BarCount AND (H[k]<H[i] AND L[k]>L[i]))
{
SH[k]=0;
SL[k]=0;
k++ ; // inside-Bars weg
}
if (k==BarCount)
SL[i]=Null;
else
{
if (NOT(H[k]>H[i]) AND NOT(L[k]>L[i])) SL[i]=Null; // doch kein Swing
else SLR[k]=SL[i];
}
}
if (Nz(SH[i])>0)
{
k=i+1;
while (k<BarCount AND (H[k]<H[i] AND L[k]>L[i]))
{
SH[k]=0;
SL[k]=0;
k++; // inside-Bars weg
}
if (k==BarCount)
SH[i]=Null;
else
{
if (NOT(H[k]<H[i]) AND NOT(L[k]<L[i])) SH[i]=Null;
else SHR[k]=SH[i];
}
}
}
// outsidebars kontrollieren
SLF=0;
SHF=0;
for (i=0;i<BarCount;i++)
{
if (SLR[i]>0 )
{
if (SLF==1 AND H[i-1]>H[i-2]) SHR[i]=H[i-1]; // outsidebar
SLF=1;
SHF=0;
}
if (SHR[i]>0 )
{
if (SHF==1 AND L[i-1]<L[i-2]) SLR[i]=L[i-1];
SLF=0;
SHF=1;
}
}
SLF=0;
SHF=0;
dist = .41 * ATR( 10 );
for (i=0;i<BarCount;i++)
{
if (SL[i]>0 )
{
if (SLF==0) PlotText( "SL",i, SL[ i ]- dist[i],colorGreen,colorYellow );
else PlotText( "SL",i, SL[ i ]- dist[i],colorRed,colorYellow );
SLF=1;
SHF=0;
}
if (SH[i]>0 )
{
if (SHF==0) PlotText( "SH",i, SH[ i ]+ dist[i],colorGreen,colorYellow );
else PlotText( "SH",i, SH[ i ]+ dist[i],colorRed,colorYellow );
SLF=0;
SHF=1;
}
}
dt = DateTime();
shdt = ValueWhen(sh, dt);
sldt = ValueWhen(sl, dt);
shh = ValueWhen(sh, H);
sll = ValueWhen(sl, L);
upline = IIf( shdt > sldt, shh - (shh-sll) * 0.618, Null);
dnline = IIf( sldt > shdt, sll + (shh-sll) * 0.618, Null);
Lastup = LastValue(upline);
Lastdn = LastValue(dnline);
whatline = IIf(Lastup > Lastdn, Lastup, Lastdn);
Colline = IIf(Lastup > Lastdn, colorBrightGreen, colorRed);
nshh = ValueWhen(H > Ref(H,-1), H);
stoppuptrend = nshh- (nshh-sll) * 0.618;
uptrend = Flip(shdt > sldt,C<Ref(nshh- (nshh-sll) * 0.618,-1));
dntrend = Flip(sldt > shdt,C> sll + (shh-sll) * 0.618);
//Plot(whatline, "", Colline, styleDashed);
Buy = H<Ref(H,-1) AND H != shh AND Lastup > Lastdn AND C > whatline AND uptrend;
Short = L>Ref(L,-1) AND L != sll AND Lastup < Lastdn AND C < whatline AND NOT uptrend;
//Plot(uptrend ,"",colorBlue,4);
//Plot(dntrend ,"",colorBlack,4);
Plot(nshh,"",colorRed,4);
Plot(Ref(stoppuptrend,-1),"",colorGreen,4);
//PlotShapes(shapeSmallUpTriangle*Buy,colorLime,0,Low-0.5*ATR(1));
//PlotShapes(shapeSmallDownTriangle*Short,colorRed,0,High+0.5*ATR(1));
|
Users who thanked for this post:
Perfect Trader (18.10.2011), trash (20.10.2011)
Dass da Short angezeigt wird bei dir, liegt am letzten SL. Somit ja wieder Shortausschau halten, solange es unter dem 61% RT bleibt. So habe ich es doch verstanden. Ansonsten musst du halt noch eine übergeordnete Trendbedingung einfügen. Wie habe ich dir ja als Bsp gezeigt.
|
|
Source code |
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 |
// AFL code by E.M.Pottasch, 9/16/2011
nbar=Param("Lookback nbars",120,3,500,1);
shift = Param("Shift", 0, 0, 500, 1);
fut=Param("Future Bars",5,0,10,1);
mm=(H+L)/2;x=Cum(1);x1=x+fut;
selv=SelectedValue(x)-shift;
bbb=Ref(LinRegIntercept(mm,nbar), -shift);
aaa=Ref(LinRegSlope(mm,nbar), -shift);
dbb=SelectedValue(ValueWhen(x,bbb,1));
daa=SelectedValue(ValueWhen(x,aaa,1));
dbb1=SelectedValue(ValueWhen(x1,bbb,1));
daa1=SelectedValue(ValueWhen(x1,aaa,1));
xx=IIf(x>selv-nbar AND x<=selv,x-(selv-nbar),Null);
yy=dbb+daa*xx;
fxx=IIf(x1>selv AND x1<=selv+fut,x1-(selv-nbar),Null);
fyy=Ref(dbb1+daa1*fxx,0);
wd=Ref(SelectedValue(Ref(2*StdErr(mm,nbar), -shift)), 0);
clr0=IIf(daa>0,ColorRGB(0,250,0),ColorRGB(250,0,0));
clr1=IIf(daa>0,ColorRGB(0,30,0),ColorRGB(30,0,0));
SetChartOptions(0,chartShowDates);
Plot(yy,"LinReg",clr0,styleDashed|styleNoRescale,0,0,0,-1);
Plot(yy+wd,"Upper Boundary",clr0,styleLine|styleNoRescale,0,0,0,-1);
Plot(yy-wd,"Lower Boundary",clr0,styleLine|styleNoRescale,0,0,0,-1);
PlotOHLC(yy+wd,yy+wd,yy-wd,yy-wd,"",clr1,styleCloud|styleNoLabel,0,0,0,-1);
Plot(fyy,"",clr0,styleDots|styleNoLine,0,0,fut,2);
Plot(fyy+wd,"",clr0,styleDots|styleNoLine,0,0,fut,2);
Plot(fyy-wd,"",clr0,styleDots|styleNoLine,0,0,fut,2);
//Plot(C,"",colorBlack,styleCandle,0,0,0,1);
|
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
dt = DateTime(); shdt = ValueWhen(sh, dt); sldt = ValueWhen(sl, dt); shh = ValueWhen(sh, H); sll = ValueWhen(sl, L); upline = IIf( shdt > sldt, shh - (shh-sll) * 0.618, Null); dnline = IIf( sldt > shdt, sll + (shh-sll) * 0.618, Null); Lastup = LastValue(upline); Lastdn = LastValue(dnline); whatline = IIf(Lastup > Lastdn, Lastup, Lastdn); Colline = IIf(Lastup > Lastdn, colorBrightGreen, colorRed); Plot(whatline, "", Colline, styleDashed); Buy = H<Ref(H,-1) AND H != shh AND Lastup > Lastdn AND C > whatline; Short = L>Ref(L,-1) AND L != sll AND Lastup < Lastdn AND C < whatline; PlotShapes(shapeSmallUpTriangle*Buy,colorLime,0,Low-0.5*ATR(1)); PlotShapes(shapeSmallDownTriangle*Short,colorRed,0,High+0.5*ATR(1)); |
Users who thanked for this post:
ibelieve (15.10.2011), Perfect Trader (15.10.2011), Vikke (15.10.2011)
Versuche mal das unter deinen Code dranzuhängen.
Forum Software: Burning Board® 3.1.6, developed by WoltLab® GmbH