Page 1 of 1

pineConnector - Stopping trades

Posted: Thu Jul 27, 2023 10:23 am
by forexyoda
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

Re: pineConnector - Stopping trades

Posted: Fri Sep 01, 2023 9:22 am
by Steve Burman
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.