
EMA黄金クロスショートライン取引戦略は,EMA指数に基づくショートライン取引戦略である.これは,異なる周期のEMAラインを使用して金叉と死叉の取引シグナルを判断し,入場シグナルとして短い周期のEMAライン,ストップシグナルとして長い周期のEMAラインを採用し,急進・急出のショートライン取引モデルを実現する.
この戦略は,4つの異なる周期のEMA平均線,すなわち9周期,26周期,100周期および55周期のEMA線を使用する.取引入場信号は9周期EMA線を26周期EMA線を横切るときに多めにする.止損退出信号は100周期EMA線を下に55周期EMA線を横切るときに平仓する.このようにして速やかに出場し,被套を避ける.
このEMAゴールドクロスショートライン取引戦略は,全体的に操作が簡単,迅速な反応の特徴を有する.パラメータ最適化と信号フィルタリングにより,その安定性と収益性のレベルをさらに向上させることができる.しかし,ショートライン取引は,トレーダーの制御能力にもより高い要求を課している.全体的に,この戦略は,ある程度の取引経験を持つ投資家の実地での使用に適している.
/*backtest
start: 2023-12-07 00:00:00
end: 2023-12-14 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © YukalMoon
//@version=5
strategy(title="EMA SCALPEUR", overlay=true, initial_capital = 1000)
//// input controls
EMA_L = input.int (title = "EMA_L", defval = 9, minval = 1, maxval = 100, step =1)
EMA_L2 = input.int (title = "EMA_L2", defval = 26, minval = 1, maxval = 100, step =1)
EMA_S = input.int (title = "EMA_S", defval = 100, minval = 1, maxval = 100, step =1)
EMA_S2 = input.int (title = "EMA_S2", defval = 55, minval = 1, maxval = 100, step =1)
/// mise en place de ema
shortest = ta.ema(close, 9)
short = ta.ema(close, 26)
longer = ta.ema(close, 100)
longest = ta.ema(close, 55)
plot(shortest, color = color.red)
plot(short, color = color.orange)
plot(longer, color = color.aqua)
plot(longest, color = color.yellow)
plot(close)
//// trading indicators
EMA1 = ta.ema (close,EMA_L)
EMA2 = ta.ema (close,EMA_L2)
EMA3 = ta.ema (close, EMA_S)
EMA4 = ta.ema (close, EMA_S2)
buy = ta.crossover(EMA1, EMA2)
//sell = ta.crossunder(EMA1, EMA2)
buyexit = ta.crossunder(EMA3, EMA4)
//sellexit = ta.crossover(EMA3, EMA4)
/////strategy
strategy.entry ("long", strategy.short, when = buy, comment = "ENTER-SHORT")
//strategy.entry ("short", strategy.short, when = sell, comment = "ENTER-SHORT")
///// market exit
strategy.close ("long", when = buyexit, comment = "EXIT-SHORT")
//strategy.close ("short", when = sellexit, comment = "EXIT-SHORT")