この戦略は,心理線指標を用いて市場の買賣力比を判断し,市場トレンドの変化を捉える. 買い物力道が売り場より強くなるときは多し,売り場力道が買い場より強くなるときは空し.心理線は簡単で使いやすいので,トレンド識別の補助ツールとして使用できる.
心理線指標は,一定の周期内における閉盘価格上昇の割合を計算する.
この比率が50%を超えると,買盘力道が売盘力道より大きいと判断して,多信号を与える.
割合が50%以下になると,買い手よりも売り手の方が大きいと判断して空調の信号を与える.
取引のバランスを考えれば,市場には明確な方向性がない.
短期または長期のトレンドを判断するためにパラメータを柔軟に調整できます.
計算方法がシンプルで,実体操作が容易である.
資金の流れを判断するのに役立つ,直観的な力強い買い手と弱い売り手を見せる.
部分的な反転信号を検出する.
戦略の効果を高めるために,他の指標と組み合わせることができます.
傾向の持続時間や強さを判断できない.
パラメータを正しく設定しない場合,大量の誤信号が生じます.
単体で使うと,他の指標と組み合わせて使うと,容易く取り付けられる.
異なる品種と周期に対応するためにパラメータを最適化する必要があります.
異なるパラメータで各種の効果をテストし,最適な周期を見つけます.
傾向の持続性を判断する指標を組み合わせる.
資金管理戦略を最適化し,ストップ・ロズとストップ・フードを設定する.
弱気なトレンドを評価し,早すぎる逆転を避ける.
特定の時間帯で戦略を閉じて,誤りやすい時間帯を回避する.
心理線指標は,それ自体では比較的シンプルですが,組み合わせて使用する効果はよくあります.傾向の変化を検出する補助的なツールの一つとして使用できますが,単独では使用してはいけません.パラメータを最適化して他の指標を統合することで,心理線戦略を新しいレベルに上げることができ,さらなる研究に値します.
/*backtest
start: 2023-09-12 00:00:00
end: 2023-09-19 00:00:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 10/04/2018
// Psychological line (PSY), as an indicator, is the ratio of the number of
// rising periods over the total number of periods. It reflects the buying
// power in relation to the selling power.
//
// If PSY is above 50%, it indicates that buyers are in control. Likewise,
// if it is below 50%, it indicates the sellers are in control. If the PSY
// moves along the 50% area, it indicates balance between the buyers and
// sellers and therefore there is no direction movement for the market.
//
// You can change long to short in the Input Settings
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="Psychological line Backtest")
Length = input(20, minval=1)
reverse = input(false, title="Trade reverse")
xPSY = sum(close > close[1],Length) / Length * 100
clr = iff(xPSY >= 50, green, red)
pos = iff(xPSY > 50, 1,
iff(xPSY < 50, -1, nz(pos[1], 0)))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1, 1, pos))
if (possig == 1)
strategy.entry("Long", strategy.long)
if (possig == -1)
strategy.entry("Short", strategy.short)
barcolor(possig == -1 ? red: possig == 1 ? green : blue )
p1 = plot(50, color=black, title="0")
p2 = plot(xPSY, color=blue, title="PSY")
fill(p1, p2, color=clr)