scalper Colorbar of indicator

Vragen en suggesties over Vesticode

Moderator: Perry

scalper Colorbar of indicator

Berichtdoor Scuderia2006 » vr 30 nov 2007, 9:54

Wie kan mij helpen?

Ik heb deze scalper opgedoken op internet, maar ik krijg hem niet goed in Vestics geplaats. Moet ik hem erin zetten als Colorbar of functie?

Hier volgt de formule:

Code: Selecteer alles
{Scalper Buys and Sells      7/18/2007
   Written by Luis Gomez
   inspired by John Carters "Mastering the Trade"
}

inputs:
   buyColor(white),
   sellColor(white),
   width(3);
variables:
   highBarsAgo(1),
   possibleHighBarsAgo(1),
   possibleHigh(-2),
   hightoBeat(-1),
   barsSincePaint(1),
   lowBarsAgo(1),
   possibleLowBarsAgo(1),
   possibleLow(10000001),
   lowtoBeat(10000000),
   triggerPriceSell(-1),
   triggerPriceBuy(1000000),
   trend(1),
   _UP(1),
   _DOWN(-1),
   _ON(1),
   _OFF(-1);



if trend = _UP then begin
   if swingHighBar(1,H,2,barsSincePaint+2) > -1 then begin
      possibleHighBarsAgo = swingHighBar(1,H,2,barsSincePaint+2);
      possibleHigh = H[possibleHighBarsAgo];
   end;

   if possibleHigh >= hightoBeat then begin
      highBarsAgo = possibleHighBarsAgo;
      hightoBeat = possibleHigh;
      triggerPriceSell = L[HighBarsAgo - 1];
   end;
   
   if C < triggerPriceSell and
      highest(high,highBarsAgo) < hightoBeat then begin
      plotpb[highBarsAgo](H[highBarsAgo],L[highBarsAgo],"",sellColor);
      alert("Scalper Sell");
      trend = _DOWN;
      barsSincePaint = highBarsAgo-1;
      hightoBeat = -1;
      lowtoBeat = 10000000;
      triggerPriceBuy = 10000000;
      triggerPriceSell = -1;
      highBarsAgo = 1;
      possibleHigh = -2;
   end;

end;

if trend = _DOWN then begin
   if swingLowBar(1,L,2,barsSincePaint+2) > -1 then begin
      possibleLowBarsAgo = swingLowBar(1,L,2,barsSincePaint+2);
      possibleLow = L[possibleLowBarsAgo];
   end;

   if possibleLow <= lowtoBeat then begin
      lowBarsAgo = possibleLowBarsAgo;
      lowtoBeat = possibleLow;
      triggerPriceBuy = H[LowBarsAgo - 1];
   end;
   
   if C > triggerPriceBuy and
   lowest(L,lowBarsAgo) > lowtoBeat then begin
      plotpb[lowBarsAgo](H[lowBarsAgo],L[lowBarsAgo],"",buyColor);
      alert("Scalper Buy");
      trend = _UP;
      barsSincePaint = lowBarsAgo-1;
      possibleLow = 10000001;
      lowtoBeat = 10000000;
      hightoBeat = -1;
      triggerPriceBuy = 10000000;
      triggerPriceSell = -1;
      lowBarsAgo = 1;
   end;      

end;

barsSincePaint = barsSincePaint+1;
if trend = _UP then highBarsAgo = highBarsAgo + 1;
if trend = _DOWN then lowBarsAgo = lowBarsAgo + 1;
setPlotWidth(1,width);
Scuderia2006
 
Berichten: 6
Geregistreerd op: vr 29 dec 2006, 20:28

Berichtdoor BarneyB » di 18 dec 2007, 13:24

Dit betreft code voor een colorbar - werkt helaas echter NIET in Vestics.
In Tradestation geen probleem.
BarneyB
 
Berichten: 17
Geregistreerd op: ma 20 jan 2003, 21:11

Colorbar

Berichtdoor BarneyB » di 18 dec 2007, 13:25

Dit betreft code voor een colorbar - werkt helaas echter NIET in Vestics.
In Tradestation geen probleem.
BarneyB
 
Berichten: 17
Geregistreerd op: ma 20 jan 2003, 21:11

Colorbar

Berichtdoor BarneyB » di 18 dec 2007, 13:25

Dit betreft code voor een colorbar - werkt helaas echter NIET in Vestics.
In Tradestation geen probleem.
BarneyB
 
Berichten: 17
Geregistreerd op: ma 20 jan 2003, 21:11


Keer terug naar Vesticode

Wie is er online

Gebruikers op dit forum: Geen geregistreerde gebruikers en 2 gasten

cron