Visualizzazione Elencata
-
26-09-14, 23:57 #3
- Data Registrazione
- Apr 2012
- Messaggi
- 43
Salve Smash x avermi risposto.
Allego un esempio e lo script relativo come richiesto:
BUY Script:
INPUTS: @periods(14) , @price(CLOSE), @matype(EXPONENTIAL),
INPUTS: @trailAmount(100),@trailPercent(10), @stopLoss(400)
SET TRAILING_STOP = @trailAmount
SET TRAILING_PERCENT = @trailPercent
SET STOP_LOSS = @stopLoss
SET a = MovingAverage(@price, 6, @matype)
SET b = MovingAverage(@price, 10, @matype)
SET c = MovingAverage(@price, 14, @matype)
SET d = MovingAverage(@price, 20, @matype)
SET e = MovingAverage(@price, 28, @matype)
SET f = LinearRegressionForecast(@price, 8)
f-30>(a+b+c+d+e/5)
SELL Script:
SET a = MovingAverage(@price, 6, @matype)
SET b = MovingAverage(@price, 10, @matype)
SET c = MovingAverage(@price, 14, @matype)
SET d = MovingAverage(@price, 20, @matype)
SET e = MovingAverage(@price, 28, @matype)
SET f = LinearRegressionForecast(@price, 8)
f+30<(a+b+c+d+e/5)
ExitLong Script:
SET a = MovingAverage(@price, 6, @matype)
SET g = LinearRegressionForecast(@price, 5)
CROSSOVER(a, g)
ExitShort Script:
SET a = MovingAverage(@price, 6, @matype)
SET g = LinearRegressionForecast(@price, 5)
CROSSOVER(g, a)
Certamente quanto richiesto nel titolo non sarà una chiave di volta, ma vorrei verificarne la % Profitable.
Ho provato a "gestire" il SET Position come hai indicato, ma non ci sono riuscito; se puoi darmi maggiori indicazioni te ne sarei grato.
Armando