1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Setting the parameters for the Hull Moving Averages
ShortTermLength = 9
LongTermLength = 21
TakeProfitX = 50 // adjust this to your liking
StopLossY = 25 // adjust this to your liking
// Calculate the Hull Moving Averages
ShortTermHMA = HullAverage [ ShortTermLength] (close )
LongTermHMA = HullAverage [ LongTermLength] (close )
// Identify when the ShortTermHMA changes from decreasing (red) to increasing (green) and LongTermHMA is also increasing
if (ShortTermHMA[ 1 ] < ShortTermHMA[ 2 ] and ShortTermHMA > ShortTermHMA[ 1 ] ) and LongTermHMA > LongTermHMA[ 1 ] then
buy at market
set target pprofit TakeProfitX
set stop ploss StopLossY
endif
Ciao Roberto, Ciao Nicolas
questa strategia di Nicolas con la media di Hull prevede solo la versione long
si puo’ aggiungere, per favore, anche la versione short?
Grazie