SignalReversalHeikinAshi

Post Reply
loule
Posts: 2
Joined: 14 Oct 2013 15:01

SignalReversalHeikinAshi

Post by loule »

Bonjour,

J'utilise la stratégie SignalReversalHeikinAshi avec des paramètre assez rapide.

Beaucoup de faux signaux apparaissent mais cela n'est pas gênant pour le moment.
Néanmoins, Lorsque le faux signal disparait, il coupe automatiquement la position et ce jusqu’à ce que le signal soit validé.
Pouvez vous m'indiquer la modification à apporter dans le code pour empêcher le faux signal de clôturer la position?



Express SignalReversalHeikinAshi_Aggregator

Vars
series
haO, haC, haH, haL,signal(50),xk,xq,idBarbig,nbig;

input
$nBarsOldTrend(1,10,3),$nBarsNewTrend(1,10,2),$nMinBarEarlySignal(1,100,1);

numeric
i,k,q;

Calculation

CalculateAtEveryTick(false);
SetYscaleFormat (GetPriceFormat());
idBarbig = CurrentBarIndex();
nbig = $nMinBarEarlySignal;
if IsFirstBar() then
begin
haO = o;
haC = c;
haH = h;
haL = l;
end
else
begin
haO = (haO[1] + haC[1]) / 2;
haC = (o + h + l + c) / 4;
haH = max(h, max(haO, haC));
haL = min(l, min(haO, haC));
if CurrentBarIndex() > ($nBarsNewTrend + $nBarsOldTrend) then
begin
for i = 0 to ($nBarsNewTrend - 1)
begin
if (haO < haC) then k = k + 1;
end
for i = $nBarsNewTrend to ($nBarsNewTrend + $nBarsOldTrend - 1)
begin
if (haO > haC) then k = k + 1;
end
if (k = ($nBarsNewTrend + $nBarsOldTrend)) then signal = 100;
xk = k;
k = 0;
for i = 0 to ($nBarsNewTrend - 1)
begin
if (haO > haC) then q = q + 1;
end
for i = $nBarsNewTrend to ($nBarsNewTrend + $nBarsOldTrend - 1)
begin
if (haO < haC) then q = q + 1;
end
if (q = ($nBarsNewTrend + $nBarsOldTrend)) then signal = 0;
xq = q;
q = 0;
end
end

interpretation
begin
end

plotcandles (haO, haC, haH, haL);




D'avance merci
Cordialement,
User avatar
WHS Support
Posts: 2430
Joined: 14 Feb 2013 10:27

Re: SignalReversalHeikinAshi

Post by WHS Support »

Bonjour,

Avant de pouvoir tester votre stratégie et répondre à votre question, nous aurions besoin de précisions quant à ce que vous entendez par "faux signaux".

Par avance merci.

Cordialement

Alexandra
WHS Lux
loule
Posts: 2
Joined: 14 Oct 2013 15:01

Re: SignalReversalHeikinAshi

Post by loule »

L'ombre du signal apparait sur l’écran et déclenche l'ordre d'achat ou de vente.
En fonction de la direction des bougies, l'ombre reste (signal valide) ou l'ombre disparait (faux signal) et coupe l'ordre en cours.
User avatar
WHS Support
Posts: 2430
Joined: 14 Feb 2013 10:27

Re: SignalReversalHeikinAshi

Post by WHS Support »

Bonjour,

Je pense que le plus simple serait de contacter directement le helpdesk, afin de nous expliquer plus avant ce que vous voyez à l'écran.

En vous remerciant

Alexandra
WHSLux
Post Reply

Return to “WHS NanoTrader”