Login Page - Create Account

Support Board


Date/Time: Mon, 28 Oct 2024 08:57:30 +0000



Post From: How can I add a delay before a trade decision is made in Spreadsheet for Trading study?

[2023-11-20 12:09:02]
User370531 - Posts: 55
I'm trading two stocks, symbol A and symbol B, using separate strategies under one account. Each stock is on a different chart in a chartbook and linked to unique sheets in the same trading spreadsheet. I want to manage their risks independently.

Here's my method: I use a new sheet to determine how many contracts to buy for each stock based on the account's value. For example, I decide to buy 10 contracts of A and 15 of B. When a trade for A is initiated, the system is set to temporarily stop trading for B by setting its contract count to zero. This prevents B from trading until A's trade is complete. However, if both stocks trigger trades at the same bar close, they both execute before the spreadsheet can update and pause the other.

How can I solve this problem? A brief delay (1 second) between trades should give the spreadsheet study time to adjust the contract numbers for B after A's trade, preventing simultaneous trades. Is there a way to do this?