OPEN-SOURCE SCRIPT
Atualizado RedFlag

Counter-trend strategy
Condition to open a long position:
Buys if the price drops by a specified percentage from the previous candle’s close. Only one purchase can be made within a single candle.
Condition to close a position:
Places a separate individual closing limit order for each purchase, or uses one common take-profit order for the whole position.
⚠️ Attention: Stop-loss is not implemented in the current first version of the strategy.
Options description:
Drop_percent, % — Percentage drop in price from the From point
From — The reference point on the closed candle from which the Drop_percent is calculated (Open, Close, High, Low)
Tp, % — Take-profit level as a percentage
Count — Number of allowed additional purchases (scaling in)
Each_tp — Mode switch:
True — a separate take-profit is placed for each purchase
False — one common take-profit is placed based on the average entry price of the position
Condition to open a long position:
Buys if the price drops by a specified percentage from the previous candle’s close. Only one purchase can be made within a single candle.
Condition to close a position:
Places a separate individual closing limit order for each purchase, or uses one common take-profit order for the whole position.
⚠️ Attention: Stop-loss is not implemented in the current first version of the strategy.
Options description:
Drop_percent, % — Percentage drop in price from the From point
From — The reference point on the closed candle from which the Drop_percent is calculated (Open, Close, High, Low)
Tp, % — Take-profit level as a percentage
Count — Number of allowed additional purchases (scaling in)
Each_tp — Mode switch:
True — a separate take-profit is placed for each purchase
False — one common take-profit is placed based on the average entry price of the position
Notas de Lançamento
fix TP price calculation Notas de Lançamento
Fix entry count limitScript de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
hamster-bot.com/phoenix - инвестиционный алгофонд - консервативный доход
t.me/bothamster - канал бота
t.me/bothamster - канал бота
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
hamster-bot.com/phoenix - инвестиционный алгофонд - консервативный доход
t.me/bothamster - канал бота
t.me/bothamster - канал бота
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.