このBISTは4段階の定量化買収戦略を

作者: リン・ハーンチャオチャン,日付: 2023年12月19日 15:21:22
タグ:

img

このBIST株式の4段階の定量化買収戦略は,波動を追跡するために4段階の購入に基づいています. 操作後の市場に入り,購入者の需要が増加すると販売します. この戦略は,大きな変動を持つ株式に適しており,段階的な購入を通じてより良いコスト制御を達成します.

戦略の原則

この戦略では,まずレジスタンスとサポートラインを計算します.レジスタンスラインは,閉値と高価格の振動動平均の交差点によって決定され,サポートラインは,閉値と低価格の振動動平均の交差点によって決定されます.

価格がサポートラインを下に突破すると,価格がレジスタンスラインから設定された購入範囲内であれば,最初の段階ではポジションの25%を購入します. その後,最初の購入価格の周りにポジションの25%を購入します. そして4回,最終的にポジションの100%を保持します.

株価が開場料の2倍を超えると すべてのポジションを閉じる

戦略 の 利点

  1. 4段階の購入により購入コストを下げる
  2. ストック変動を追跡することで より良い入口点
  3. 適正な利益を得るために 合理的な利得ポイント

リスク と 解決策

  1. ストック減少が継続し,ストップ・ロスはなくなり,大きな損失をもたらした.

    • 損失を効果的に制御するために合理的なストップ損失を設定する
  2. パラメータの設定が正しくない場合,複数の購入ポイントがコストの多様化に近すぎる

    • 購入段階間の適切な価格差を設定する
  3. 損失を効果的に制御するには,ストップ・ロスト・ポイントが大きすぎる

    • 実際の取引環境と心理的耐性に基づいて適切な停止距離を設定する

オプティマイゼーションの方向性

  1. 異なる種類のストックのパラメータを調整し,その特性をより良く調整する

  2. 波動性が上昇するときに購入する波動性指標を追加します.

  3. トレイリングストップを使用して利益を引き上げることを最適化します.

  4. 価格が特定のレベルを突破すると損失を削減するためにストップ損失設定を追加します.

概要

BISTの4段階の定量調達戦略は,一般的なコンセプト株式全体に適しています. 購入を段階的にすることで,価格が引き下がるときにより良いコストを得るために株の変動性を効果的に利用できます. また,合理的な利益とストップ損失設定により,リスク管理でうまく機能できます.実際の市場環境に基づいて継続的なパラメータ調整と最適化により,この戦略は信頼性のあるアルファを提供することができます.


/*backtest
start: 2022-12-12 00:00:00
end: 2023-12-18 00:00:00
period: 1d
basePeriod: 1h
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/
// © Cantalk

//@version=5
strategy("BİST_100 HİSSELERİ 1_SAAT 4 KADEME ALIM",overlay = true, pyramiding=4, initial_capital=10000, process_orders_on_close=true, commission_type=strategy.commission.percent, commission_value=0.002)



LB2 = input(30, title="Alım_Üst_Çizgi")
LB = input(90, title="Alım_Alt_Çizgi")
Barcolor=input(true,title="Barcolor")
Bgcolor=input(true,title="Bgcolor")
//////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////
RDirenc = ta.valuewhen(ta.cross(ta.hma(close, LB2), close), ta.highest(high, LB2), 1)
SDestek = ta.valuewhen(ta.cross(close, ta.hma(close, LB)), ta.lowest(low, LB), 1)



//plot(RDirenc,title="Resistance", color=#f7d707fc, linewidth =2)
//plot(SDestek,title="Support", color=#064df4, linewidth = 2)

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

LB22 = input(40, title="Satım_Üst_Çizgi")
LB1 = input(300, title="Satım_Alt_Çizgi")

Barcolor2=input(true,title="Barcolor2")
Bgcolor2=input(true,title="Bgcolor2")
//////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////
RDirenc2 = ta.valuewhen(ta.cross(ta.hma(close, LB22), close), ta.highest(high, LB22), 1)
SDestek2 = ta.valuewhen(ta.cross(close, ta.hma(close, LB1)), ta.lowest(low, LB1), 1)



//plot(RDirenc2,title="Resistance2", color=#f40a0afc, linewidth =2)
//plot(SDestek2,title="Support2", color=#0eed0e, linewidth = 2)

//colors=if(close>RDirenc, color= #008000,if(SDestek<close,color=#FFFF00,color=#FF0000))

aralik_yuzde_alis = ((RDirenc-SDestek)/SDestek)*100
fark = input(25.0, title="Alış Aralığı %")



aralik_yuzde_satis = ((RDirenc2-SDestek2)/SDestek2)*100
fark2 = input(45.0, title="Satış aralığı %")




buyProcess = input(0.12, "ALIM YERİ %")
//buyProcess2 = input(0.10, "ALIM YERİ-2 %")
//buyProcess3 = input(0.10, "ALIM YERİ-3 %")



buy1 = strategy.position_avg_price - (strategy.position_avg_price * buyProcess)

buy2 = buy1 - (strategy.position_avg_price * buyProcess)

buy3 = buy2 - (strategy.position_avg_price * buyProcess)

buy4 = buy3 - (strategy.position_avg_price * buyProcess)



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
isLong1 = if ta.crossover(close, SDestek) and aralik_yuzde_alis < fark 
    1
else
    0

    
isLong2 = if ta.crossover(close, SDestek) and (close <=  buy1)
    1
else
    0

isLong3 = if ta.crossover(close, SDestek) and (close <=  buy2) 
    1
else
    0

isLong4 = if ta.crossover(close, SDestek) and (close <= buy3) 
    1
else
    0



message_long_entry  = input("long entry message")
message_long_exit   = input("long exit message")


fullProfit = input(2.00, "PROFİT SATIŞ SEVİYESİ")
profit = strategy.position_avg_price * fullProfit
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

strategy.entry(id = "BUY-1", direction = strategy.long, qty = 25, when = (isLong1 and strategy.position_size == 0), alert_message = message_long_entry)
strategy.entry(id = "BUY-2", direction = strategy.long, qty = 25, when = (isLong2 and strategy.position_size == 25), alert_message = message_long_entry)
strategy.entry(id = "BUY-3", direction = strategy.long, qty = 25, when = (isLong3 and strategy.position_size == 50), alert_message = message_long_entry)
strategy.entry(id = "BUY-4", direction = strategy.long, qty = 25, when = (isLong4 and strategy.position_size == 75), alert_message = message_long_entry)



buyclose1 = if  (close >= (strategy.position_avg_price + profit)) and aralik_yuzde_satis > fark2
    close
    

strategy.exit("EXİT",qty_percent = 100, stop = buyclose1)


aritmeticClose =  strategy.position_avg_price + profit
plot(aritmeticClose, color = color.rgb(248, 5, 240), linewidth = 1, style = plot.style_linebr)

もっと