Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 02:25:29 +0000



[User Discussion] - ALERT FORMULA QUESTION

View Count: 862

[2020-01-09 19:10:37]
Aaz86 - Posts: 6
I HAVE AN ALERT FORMULA WHICH I'VE CREATED FOR THE SPREADSHEET ALERTS STUDY AND IT LOOKS LIKE THIS -

AND (CG[-1]<>0, CI[-1]<>0, BX[-1]<0, CB[-1]>0, AB[-1]<>0)

I'VE NEVER DONE THIS BEFORE BUT AM I RIGHT IN THINKING THAT IF ALL THE FIVE CONDITIONS IN THE FORMULA TURN TRUE ON THE PREVIOUS BAR THAT THIS WILL ALERT ME??

MY NEXT QUESTION IS -

IS THERE A WAY TO HAVE THE 5 SEPERATE CONDITIONS IN THE FORMULA ANALYSED SO THAT IF THEY TURN TRUE WITHIN A NUMBER OF BARS (SAY WITHIN THE LAST 3BARS) INSTEAD OF ON JUST 1 SPECIFIC BAR I WILL GET AN ALERT?

THANKS IN ADVANCE FOR ANY HELP
[2020-01-09 20:35:03]
Sawtooth - Posts: 3976
Spreadsheet syntax is not the same as Simple Alert syntax. Row 4 is the previous bar on a spreadsheet study:
=AND(CG4<>0,CI4<>0,BX4<0,CB4>0,AB4<>0)

To include 3 previous bars:
=OR(AND(CG4<>0,CI4<>0,BX4<0,CB4>0,AB4<>0),AND(CG5<>0,CI5<>0,BX5<0,CB5>0,AB5<>0),AND(CG6<>0,CI6<>0,BX6<0,CB6>0,AB6<>0))
[2020-01-09 22:31:13]
Aaz86 - Posts: 6
WOW THANKS FOR THE QUICK REPLY!! I'LL CHANGE THE FORMULA NOW TO GIVE IT A GO AND THEN POST BACK THE RUSULT :)
[2020-01-13 17:43:49]
Aaz86 - Posts: 6
SO AFTER SCRATCHING MY HEAD FOR A WHILE IV FINALLY GOT THE FORMULARS TO WORK AND SEND ME EMAILS. FOR SOME REASON THE COLUMNS IN THE ALERT STUDY HAD SHIFTED SO MY INDICATER COLUMN REFERENCES WAS OUT BY 2!! INSTEAD OF USING COLUMN REFERENCES IV JUST REWROTE USING ID AND SUBGRAPH. NOW THAT I HAVE THEM WORKING ON MY CHART, WHAT IS THE BEST WAY TO USE THEM FOR MULTIPLE CHARTS AND CHARTBOOKS?
[2020-01-13 20:21:42]
Sawtooth - Posts: 3976
If the formula is the same on all charts, simply duplicate the chart and a spreadsheet sheet will be added for the chart. This puts all charts in the same chartbook.
The Formula Source Sheet Number will be the same as the original, and this is the sheet that contains the master formulas. You can edit the formula here and it will change on all other sheets. You therefore cannot edit the formula on sheets where its Formula Source Sheet Number does not match the sheet number.

If you want separate chartbooks, IMO it is best to use a uniquely named spreadsheet file for each chartbook, if they are to be used concurrently.
To 'duplicate' a chartbook, go to File >> Save As and give it a new name.
To rename a spreadsheet file, Save As it to another name, then select the new one in the Spreadsheet Name field of the spreadsheet study settings.

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

Login

Login Page - Create Account