Le MACD Pine est une stratégie simple

Auteur:Inventeur de la quantification, Date: 12 avril 2022 à 13h46
Les étiquettes:Le MACD


/*backtest
start: 2021-05-04 00:00:00
end: 2022-05-03 23:59:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Bitfinex","currency":"BTC_USD"}]
*/


fastPeriod = input(12, "fast")
slowPeriod = input.int(26, "slow")
singnalPeriod = input.float(9, "signal")


[fast, slow, _] = ta.macd(close, fastPeriod, slowPeriod, singnalPeriod)
plot(fast, 'fast')
plot(slow, 'slow')

if fast>slow and fast[1]<slow[1]
    strategy.entry("Enter Long", strategy.long)
else if fast<slow and fast[1]>slow[1]
    strategy.entry("Enter Short", strategy.short)
    


Relationnée

Plus de

La lune est videPourquoi une erreur s'est produite? GetAccount: 401: { "code":-2015, "msg:" Invalid API-key, IP, or permissions for action, request ip: 43.198.104.193"} Invalid

La lune est videMaître, pourquoi le fonctionnement est-il en panne?