Support Board
Date/Time: Mon, 10 Mar 2025 03:11:23 +0000
Spreadsheet Formula - Buy Entry
View Count: 778
[2022-03-15 17:51:58] |
User837393 - Posts: 143 |
Can you help in finding out what is wrong with this condition for a buy entry in a spreadhseet formula? This is returning #Syntax. =AND ((OR(Z4,AK4,AV4,BG4)), (OR(150<BI4),(BI4<-150))) Where BI is a slope value Z4 AK4 AV4 and BG4 returns already a 0 or a 1. Best regards. Date Time Of Last Edit: 2022-03-15 17:53:48
|
[2022-03-15 18:00:07] |
Sawtooth - Posts: 4181 |
Unnecessary parentheses make it difficult to find the one that's missing. Try this: =AND(OR(Z4,AK4,AV4,BG4),OR(150<BI4,BI4<-150)) |
[2022-03-15 19:44:39] |
User837393 - Posts: 143 |
What if I'd like to build a Buy Exit condition for, lets take for example, 6 tick above Ask Price. Could this be expressed as such : =AND ($J$14>($J$9+1.5), $J$8>1) Where: J14 is the Ask price (read only) cell J8 the position quantity cell J9 the position average price cell Thank you. Date Time Of Last Edit: 2022-03-15 19:45:03
|
[2022-03-15 19:59:43] |
Sawtooth - Posts: 4181 |
=AND($J$14 > $J$9+1.5, $J$8>1) should be fine. Notes: - J9 is the average price of multiple entries, not the entry price of any entry except the first one. - This formula will not produce arrows at previous exits. |
[2022-03-15 23:01:19] |
User837393 - Posts: 143 |
Thank you for the precision. However, I’m not certain I understand the following statement: J9 is the average price of multiple entries, not the entry price of any entry except the first one.
« J9 is the average price...» Ack. « … not the entry price of any entry except the first one.» you lost me there. Is it the average price or is it the first one (price of the first entry)? Date Time Of Last Edit: 2022-03-15 23:03:36
|
[2022-03-15 23:29:09] |
Sawtooth - Posts: 4181 |
J9 is not the average of a single entry at one price because there is nothing to average. In this case, J9 would be the entry price. If the entry had more than one contract and they all were filled at the same price, there would also be nothing to average. If the entry has more than one contract, and if each got filled at different prices, J9 would average the entry prices. If you scale-in, J9 will average each entry's price. The calculation of J9 varies based on this setting: Chart >> Chart Settings >> Advanced Settings 3 tab >> Open Position Average Price Trading Information Windows: How Average Price for Positions Is Calculated and Used |
[2022-03-16 00:24:34] |
User837393 - Posts: 143 |
If the entry has more than one contract, and if each got filled at different prices, J9 would average the entry prices.
If you scale-in, J9 will average each entry's price. Thank you, that is in line with what I need. …on that note, in a scalling-in scenario, once an exit condition is triggered will it will market fill all the contrats? |
[2022-03-16 02:21:16] |
Sawtooth - Posts: 4181 |
in a scalling-in scenario, once an exit condition is triggered will it will market fill all the contrats?
Using L3/N3 for exits will exit the quantity of J26.You can use J82/J83 for a separate exit quantity. You could reference J8 in J83. (Note: SC's documentation is not up to date on J82/J83.) Another way would be to use J29. Date Time Of Last Edit: 2022-03-16 02:33:52
|
To post a message in this thread, you need to log in with your Sierra Chart account: