Login Page - Create Account

Support Board


Date/Time: Thu, 16 Jan 2025 19:11:07 +0000



[Programming Help] - Spreadsheet Auto trading

View Count: 886

[2017-10-30 14:03:50]
User81767 - Posts: 6
I am trying to build a spreadsheet auto trading system.

What formula would go in K3 to trigger a BUY entry with a Change of Slope (change of MA bar color from red to black)?
What formula for L3 to EXIT the trade when the next Change of Slope occurred? (change of MA bar color from black to red?

Conversely, what formula would go in M3 to trigger a SELL entry with Change of Slope (change of MA bar color from black to red)?
What formula for N3 to EXIT the trade when the next Change of Slope occurred (change of MA bar color from red to black?
[2017-10-31 18:02:18]
Sierra Chart Engineering - Posts: 104368
In the examples here at 8 and 9 there are formulas related to Slope:
Study/Chart Alerts And Scanning: Alert Formula Examples

Those examples are for Alerts directly on studies.

You can then use the general concept for Spreadsheets. Here is the documentation for referencing Study Subgraphs on a Spreadsheet:
Working with Spreadsheets: References to Study Subgraph Columns when using the Spreadsheet Study

And here is the documentation for the Spreadsheet System for Trading study:
Spreadsheet Systems, Alerts and Automated Trading: Creating a Trading System for Automated Trading
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: 2017-10-31 18:05:19
[2017-11-01 20:34:18]
User81767 - Posts: 6
=OR(AND(SG1[0] > SG1[-1],SG1[-1] < SG1[-2]),AND(SG1[0] < SG1[-1],SG1[-1] > SG1[-2]))
The formula referenced above came from your reference in your answer.
“In the examples here at 8 and 9 there are formulas related to Slope:
Study/Chart Alerts And Scanning: Alert Formula Examples

The formula has two steps:
1.It identifies a change in slope by (a) a change in color of the MA bars and (b) a change in direction of the MA.
2. It then selects from a list of audio alerts to make a sound.

I want to change this formula to modify its function as follows:
1.  Same function.
2.  It will select from a list of placing a “buy” or “sell” order

Presently when I place this formula in K3 under “Buy” on a spreadsheet associated with a chart it returns an error #SYNTEX! It looks like the section “StudyChartAlertsAndScanning.php#FormulaExamples” is the part that is wrong.

Can somebody help me so that when this formula is in K3 (Buy) it will place a buy order and when the formula is in L3 (Sell) it will sell this position?

Conversely, it also needs to be modified to be used in execution a short position in M3 and N3.
Thanks for your help.

billhess0@gmail.com
[2017-11-10 04:46:26]
Sierra Chart Engineering - Posts: 104368
We apologize for the delay. We are quite busy and there was also a posting from another user who made a post which was not entirely accurate.

It is now deleted.


What formula would go in K3 to trigger a BUY entry with a Change of Slope (change of MA bar color from red to black)?

Assuming you have a Moving Average on the chart with ID1, this would be the formula to accomplish this assuming you are looking for a change to an upslope from a downslope:
=AND(ID1.SG1@3 > ID1.SG1@4, ID1.SG1@4 < ID1.SG1@5)

We also understand that you want a refund. We will do that minus a service charge. Would you also want us to refer you to someone who can help you with spreadsheet programming?
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: 2017-11-10 04:47:49
[2017-11-10 13:26:13]
User81767 - Posts: 6
Yes, please refer me to someone who can help me with spreadsheet programming.

Bill

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

Login

Login Page - Create Account