上位TFのデータを取り扱う際に、欲が出て1段上、2段上と複数の上位TFに手を出したくなります。 本稿では、三項演算子を使った上位TF自動設定を関数化して以下のように使っています。 higher_tf(tf=timeframe.period)=> _s=timeframe.in_seconds(tf) timeframe.in_seconds("1")>_s?
This tool helps you turn your plain English trading ideas into Pine Script V5 code. Pine Script is the language used on TradingView to create custom trading strategies. You do not need to write code ...
仕様が変わりました! Pine Script v6の仕様変更で、request.*の引数としてseries stringが使えるようになりました。 これは大きな変更で、自動的に上位timeframeを求める際に、これまでは代入式の右辺に分岐やseries変数が出現しないように気を使って書いていた部分 ...