OPEN-SOURCE SCRIPT
Simple Pyramid Strategy

This 'Simple Pyramid Strategy' is a generic trading strategy that takes a Buy/Sell source input of: [> 0 for Buy, < 0 for Sell, = 0 for Neither]
For every signal on every bar, it will open, or add to the current position if in the same direction, by the amount of the configured 'Default order size'.
A signal in the opposite direction to the current position will completely close out that position and open a new one in the opposite direction.
It also takes an optional 'Cancel' indicator to close positions or prevent them from being opened. [> 0 for Buy, < 0 for Sell, = 0 for Neither]
A SELL signal from the cancel indicator will close a long position and a BUY signal will close a short. A SELL will have no effect on a short, as will a BUY not effect a long.
A stop can optionally be applied, as an actual value, or else a percentage of the price of the chart asset. The current position will close out if the P/L for it exceeds a loss of more than this amount.
0 means no stop will be applied.
Be sure to configure the 'Pyramiding' option to a large number, and ensure 'Initial capital' is also enough to avoid liquidations.
My 'Simple Buy/Sell Indicator' and 'Custom Buy/Sell Indicator' (coming soon - watch this space) can be used to combine other indicators together into BUY / SELL strategies, using multiple custom rules. These can then be used as inputs to this strategy.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.