Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 14:30:28 +0000



[Programming Help] - Steps To Create a Trading System for Automated Trading

View Count: 543

[2021-03-17 15:39:17]
User_007 - Posts: 2
Spreadsheet Systems, Alerts and Automated Trading: Steps To Create a Trading System for Automated Trading

I was working through the basics of setting up an ATM.

Your (very helpful) guide has at #25:

"To Sell when the Last price crosses from above the moving average, type in cell M3 (labeled: Sell Entry):

=CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID2.SG1@3:ID2.SG1@4)

Where ID0.SG4@3:ID0.SG4@4 refers to the current and previous last trade prices of the chart bars and ID2.SG1@3:ID2.SG1@4 refers to the current and previous Moving Average - Simple values which are located in column AA.

You can also optionally use: =AND(CROSSFROMBELOW( ID0.SG4@3:ID0.SG4@4, ID2.SG1@3:ID2.SG1@4), $J$8=0)"

Should the suggested formula be changed from:
=AND(CROSSFROMBELOW( ID0.SG4@3:ID0.SG4@4, ID2.SG1@3:ID2.SG1@4), $J$8=0)
to:
=AND(CROSSFROMABOVE( ID0.SG4@3:ID0.SG4@4, ID2.SG1@3:ID2.SG1@4), $J$8=0)

??

Many thanks.
[2021-03-17 19:58:53]
Sawtooth - Posts: 3992
CROSSFROMBELOW would be used in cell K3 for a buy entry.
CROSSFROMABOVE would be used in cell M3 for a sell entry.

K3:
=AND(CROSSFROMBELOW( ID0.SG4@3:ID0.SG4@4, ID2.SG1@3:ID2.SG1@4), $J$8=0)
M3:
=AND(CROSSFROMABOVE( ID0.SG4@3:ID0.SG4@4, ID2.SG1@3:ID2.SG1@4), $J$8=0)
These formulas assume the moving average is ID2.

You can use these shortened versions instead:
K3:
=AND(CROSSFROMBELOW( E3:E4, ID2.SG1@3:ID2.SG1@4), $J$8=0)
M3:
=AND(CROSSFROMABOVE( E3:E4, ID2.SG1@3:ID2.SG1@4), $J$8=0)
These formulas assume the moving average is ID2.

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

Login

Login Page - Create Account