Login Page - Create Account

Support Board


Date/Time: Thu, 28 Mar 2024 22:49:38 +0000



[User Discussion] - time function

View Count: 1060

[2014-11-30 22:21:56]
User81350 - Posts: 2
I need spreadsheet function setting for market close for buy or sell orders. I want any active order close when market session close like 1615 pm (USA). I want to put it into Buy(exit) and sell(exit) cols like L and N. Many thanks in advance.
[2014-11-30 23:39:47]
Sawtooth - Posts: 3952
To flatten your position before market close, put this in cell J29:
=J41-INT(J41)>TIMEVALUE("16:14:00")

[2014-12-01 23:11:29]
Sierra Chart Engineering - Posts: 104368
This can be accomplished by using the Spreadsheet System for Trading study which is documented on this page:
http://www.sierrachart.com/index.php?page=doc/doc_SystemsAlerts.php

Specifically you will need to use the Cancel Working Orders cell:

http://www.sierrachart.com/index.php?page=doc/doc_SystemsAlerts.php#CancelWorkingOrders
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2014-12-01 23:11:50
[2014-12-02 10:11:54]
User81350 - Posts: 2
Yes it works, Thanks Tomgilb, I really appreciate. I was also try to run function for Awesome Oscillator. I try Crossover and even cross from above etc. But it returns value 0, and nothing happened. I put this in Buy and sell entry cells like K,M etc.

for example for crossover function I used this, in my spreadsheet the AO is in AC and zero line is AD.

=CROSSOVER(AC3:AC4,AD3:AD4)

if you can help me to fix this, thanks in advance.

[2014-12-02 13:58:11]
Sawtooth - Posts: 3952
That formula will return a -1 if cross from below, and a 1 if cross from above.
You could use the CROSSFROMBELOW and CROSSFROMABOVE functions in K3 and M3 respectively, or you could use the CROSSOVER function and write the K3 and M3 formulas to separate the 1s from the -1s.

But try this instead:
K3:
=AND(AD4>AC4,AC3>AD3)
M3:
=AND(AD4<AC4,AC3<AD3)

Notice the only change is the direction of the operators.


To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account