Page 1 of 1

Coloration WMA

Posted: 11 Jan 2017 19:36
by WHFX
Bonjour.

Vous serait-il possible de me donner le code permettant de colorer selon 3 critères (ascendant, descendant, flat ) le code express de WMA ci-dessous (ou une version ultérieure s'il en existe une).

Pouvoir paramétrer le critère quantifiant l'état "flat" serait également très intéressant.

En vous en remerciant par avance.
Bien cordialement.

---

// Copyright Fipertec
// Version 1.5

Express Mov_Avg_Weighted

Vars

numeric i;

series
line,
price,
senti(50);

input
$period (1,100,25),
$Price("Open;Close;High;Low",1),
$MessageBox("No;Yes",0),
$PlaySound("No;Yes",0),
$SendEmail("No;Yes",0);

Calculation

if IsFirstBar() then
begin
CalculateAtEveryTick(false);
SetYscaleFormat(GetPriceFormat());
for i = 0 to FinalBarIndex()
begin
if $Price = 3 then price[-i] = l[-i];
else
if $Price = 2 then price[-i] = h[-i];
else
if $Price = 1 then price[-i] = c[-i];
else
if $Price = 0 then price[-i] = o[-i];
end
WeightedMovingAverage(price, line, $period);
end

if (price > line) then senti = 65;
if (price < line) then senti = 35;

if (price[1] < line[1]) and (price > line) then
begin
senti = 100;
if ($SendEmail = 1) then SendEmail("Buy signal","Buy signal Mov_Avg_Weighted: " + SymbolName());
if ($PlaySound = 1) then Playsound("ring");
if ($MessageBox = 1) then MessageBox("Buy signal Mov_Avg_Weighted: " + SymbolName());
end

if (price[1] > line[1]) and (price < line) then
begin
senti = 0;
if ($SendEmail = 1) then SendEmail("Sell signal","Sell signal Mov_Avg_Weighted: " + SymbolName());
if ($PlaySound = 1) then Playsound("ring");
if ($MessageBox = 1) then MessageBox("Sell signal Mov_Avg_Weighted: " + SymbolName());
end

interpretation

begin
sentiment = senti;
end

plot (line, lightblue, 1);//@@@cs:609384-3599997-461720_cs@@@

Re: Coloration WMA

Posted: 13 Jan 2017 14:14
by WHS Support
Bonjour,

Je fais suite à votre post et vous informe qu'il nous est en effet possible de vous fournir le code express qui vous permettra de colorer votre WMA en fonction des critères ascendants ou descendants.

En ce qui concerne le critère flat toute la difficulté réside dans le fait de définir et pour cet élément nous vous inviterons à contacter un programmeur professionnel qui réalisera cela pour vous.

N'hésitez pas à me contacter au service client afin que je vous transmette le code Express et vous fournisse les coordonnées d'un programmeur professionnel.

Dans cette attente, je reste à votre disposition.

Bien Cordialement,

Amélie

WH SelfInvest

Re: Coloration WMA

Posted: 16 Jan 2017 11:39
by WHFX
Merci Amélie.
Je prends contact avec vous au service clients.