AleksandrLombrozo

Engulfing below EMA 120

Buy bullish engulfing above EMA 24
Sell bullish engulfing below EMA 24
Mercurius A.M.

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?
//@version=2
strategy("engulfing", pyramiding=20)
//модуль тела свечи
body=abs(open-close)
//цвет свечи: красная или зеленая
colour=open>close
//взвешенная сс
ema_1D=ema(close,5)
period_ema=input(defval=120,title="period_ema",type=integer, minval=1, maxval=500, step=5)
ema_1h=ema(close,period_ema)
ema_24=ema(close,24)
//верхняя тень
up_shadow=abs(high-close)
//бычья сила бычей свечи
from_down_power=abs(low-close)
//нижняя тень
down_shadow=abs(low-close)
//медвежья сила медвежей свечи
from_up_power=abs(high-close)
m=rsi(close,6)
rsi_slow=rsi(close,12)
rsi_fast=rsi(close,6)
x=((body[0]>body[1] or ((body[0]+body[1])>body[2])) and close[0]>open[1] and colour[0]==false and colour[1]==true and from_down_power[0]>up_shadow[0] and up_shadow[0]<body[0] and isdwm)
y=((body[0]>body[1] or ((body[0]+body[1])>body[2])) and close[0]<open[1] and colour[0]==true and colour[1]==false and from_up_power[0]>down_shadow[0] and down_shadow[0]<body[0] and isdwm)
w=((body[0]>body[1] or ((body[0]+body[1])>body[2])) and close[0]>open[1] and ema_1h[0]>ema_1h[1] and colour[0]==false and colour[1]==true and from_down_power[0]>up_shadow[0] and up_shadow[0]<body[0] and isintraday and rsi_slow<rsi_fast) 
e=((body[0]>body[1] or ((body[0]+body[1])>body[2])) and close[0]<open[1] and ema_1h[0]<ema_1h[1] and colour[0]==true and colour[1]==false and from_up_power[0]>down_shadow[0] and down_shadow[0]<body[0] and isintraday and rsi_slow>rsi_fast) 
r=close[0]>close[1] and  colour[0]==false and colour[1]==true and isdwm and open[0]<close[1]
t=close[0]<close[1] and  colour[0]==true and colour[1]==false and isdwm and open[0]>close[1]
period_=input(defval=1,title="period_",type=integer, minval=1, maxval=100, step=1)
buy_qty=(200/(((close[0]-lowest(low,period_))*100000)))*100000
stop_buy=lowest(low, period_)
profit_buy=((close[0]-lowest(low,period_))*2)*100000
strategy.entry("buy", strategy.long, qty=buy_qty, when=w)
strategy.exit("close", from_entry=strategy.position_entry_name, stop=stop_buy, profit=profit_buy, when=w)
sell_qty=(200/(((highest(high,period_)-close[0])*100000)))*100000
stop_sell=highest(high, period_)
profit_sell=((highest(high,period_)-close[0])*2)*100000
strategy.entry("sell", strategy.short, qty=sell_qty, when=e)
strategy.exit("close", from_entry=strategy.position_entry_name, stop=stop_sell, profit=profit_sell, when=e)
plot(strategy.equity)