AlbertoCuadra / algo_trading_weighted_strategy

Algorithmic Trading Weighted Strategy developed in Pine Script for TradingView
Other
207 stars 78 forks source link

Error: incompatibility with pyramiding #56

Open eth-man opened 2 years ago

eth-man commented 2 years ago

i had this strategy running well for a few days with pyramiding settings at 2 orders ,take profit orders at 4 seems like the second buy and 4 take profit orders executed instantly
any idea what can cause this issue?

image

thanks

AlbertoCuadra commented 2 years ago

Hello @eth-man, thanks for reporting the bug.

At the moment, the algorithm is incompatible with pyramiding. The Take Profit (TP) orders are assigned to a constant id ('Long' or 'Short'). As a consecuence, e.g., in the case of a long position, if is opened at a price higher than a previous TP order, the strategy will set instantaneously the TP orders that were satisfied.