
Originariamente Scritto da
armando
Gent. Max e Fabio
Di seguito lo script posto in strategia nella giornata odierna.
Script Buy:
INPUTS: @price(CLOSE), @periods(14), @trailAmount(100), @trailPercent(10), @stopLoss(400), @SLperiods(8)
INPUTS: @matype(EXPONENTIAL)
SET TRAILING_STOP = @trailAmount
SET TRAILING_PERCENT = @trailPercent
SET STOP_LOSS = @stopLoss
SET TnP= TotalNetProfit()
SET a = MovingAverage(@price, 8, @matype)
SET b = MovingAverage(@price, 14, @matype)
SET c = MovingAverage(@price, 20, @matype)
SET d = MovingAverage(@price, 30, @matype)
a> b AND
b> c AND
c> d AND
((a+b+c)/3) - d> 15
AND TIME <1730
AND (TnP< 800 OR TnP >-500)
Script Sell:
SET a = MovingAverage(@price, 8, @matype)
SET b = MovingAverage(@price, 14, @matype)
SET c = MovingAverage(@price, 20, @matype)
SET d = MovingAverage(@price, 30, @matype)
SET TnP = TotalNetProfit()
a< b AND
b< c AND
c< d AND
d- ((a+b+c)/3) > 15
AND TIME <1730
AND (TnP< 800 OR TnP >-500)
E questo é il risultato:
Mi sembra che adesso, con la suddetta formulazione, lo script "tollera" la presenza del TotalNetProfit in oggetto ma che nel contempo, come dal trend il risultato sia purtroppo di non intervenuto.
Saluti
Armando