forexyoda
Pine Script Scholar
Pine Script Scholar
Posts: 2
Joined: July 27th, 2023
Location: Germany
Contact: Website TradingView Profile

pineConnector - Stopping trades

Hi,
i am new to to pineconnector and i wonder what is the best way to stop the trade and interrupt the automation for a period time, so it would be very ease to reinvoke everything after the news.

thanks in advanced

Steve Burman
Moderator
Moderator
Posts: 109
Joined: January 13th, 2023

Re: pineConnector - Stopping trades

I suggest you have a boolean input named usePineConnector which will display in the settings of your strategy... such as

usePineConnector = input.bool(title="Use PineConnector", defval=false, tooltip="Tick to send data to PineConnector and un-tick to not send data to PineConnector")

If you wrap the code where you create and send your PineConnector data in an IF statement such as...

If usePineConnector
This is where your PineConnector code creates and sends data


You can then untick this setting when you want to stop sending data to PineConnector and re-tick it when you want to send data to PineConnector that should work.

Return to “Pine Script Q&A”