Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 06:22:44 +0000



Post From: How can I delay a new Entry after a filled Exit?

[2020-08-05 15:16:17]
Hammerhead - Posts: 14
Hi,

I'm not an SC engineer, but they get a little overwhelmed with questions from time to time and I decided I would try to help out.

What I would do, and maybe this will work, I would put a formula in cell J28 (Disable auto-trading), where the value is 'true' from the time the Exit order is filled to the later time.

How I would go about doing that is use the SCDateTimes contained in cell J41 (Last Bar End DateTime) and J43 (Last Exit Trade DateTime).

So, the formula you would put in cell J28 would read something like this, but I don't know exactly if it would work for what you're trying to accomplish:

=AND(FRACTIME(J41)>=FRACTIME(J43),FRACTIME(J41)<(FRACTIME(J43)+(1/144)))

Where 'FRACTIME' gets the TimeValue of the cell, and according to this link https://www.sierrachart.com/index.php?page=doc/SpreadsheetFunctions.html#SerialDateTimeValues, the '1/144' would equal 10 mins.

One thing to be aware of though is that it seems that if the Entry column and cell J28 become 'true' simultaneously then the Entry order will still be submitted. I believe that would only occur in your case though, if your Limit Buy Order fill returns a '1' for cell M3.


As for the TIF:

"All new orders use the settings of the Trade Window for the chart.

Go to the chart that contains the Spreadsheet System for Trading study. Select Trade >> Attach Trade Window to Chart to see what the settings are set to.

For example, if the Time in Force is set to Day, then all new orders submitted from the Spreadsheet will automatically have a Time in Force of Day.

The settings that you can set in the Trade Window also include Attached Orders. For complete instructions for Attached Orders, refer to the Attached Orders page." -- https://www.sierrachart.com/index.php?page=doc/SpreadsheetSystemsAlertsAndAutomatedTrading.php#top

Regards,