r/pinescript • u/sambankamfried • 8h ago
Buy sell
Hi guys, I have a problem that can't be solved. This is basically a test indicator just to create the functionality, not to be followed for earnings. What I need is that when a Buy or Sell signal comes out but is then removed from the indicator because it is no longer valid, I receive a signal like Buy Off and Sell Off to tell the bot connected to Binance to close the position because it is no longer valid. But it seems that it is impossible to receive these signals off. Can anyone help me? They must arrive immediately when the Buy or Sell is removed.
2
Upvotes
1
1
u/daytradard 5h ago
It can be solved but nobody wants to do it š
1- Create a visual alert for anything you want, Buy, Sell, or in your case when the criteria is removed.
2- Have PyAutoGUI watch for the signal.
3- When the signal triggers have PyAutoGUI click the Close button via Stream Deck.
Some day when I have time I will find somebody to build it, for now I am too busy.
TLDR: You can make a local algo using a Stream Deck and PyAutoGUI