Support Board
Date/Time: Thu, 06 Mar 2025 18:54:33 +0000
[Programming Help] - Spreadsheet System Buy Exit Order Signal Ignored
View Count: 1202
[2022-02-08 00:45:52] |
GG - Posts: 20 |
Hello, My system is as follows: BuyEnter: Bottom Band 1 of VWAP =CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG3@3:ID5.SG3@4) SellEnter: Top Band 1 VWAP =CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID5.SG2@3:ID5.SG2@4) BuyExit: Middle VWAP (Target), -80P (Stop) Sell Exit: Middle VWAP (Target), 80P (Stop) The entries work fine. The exits are what I'm having trouble executing. When I enter =CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID5.SG1@4) and leave the stop limit via the trade window on, the arrows appear but the code "BuyExit signal is ignored. Long position quantity does not exist or there are already working exit orders that will flatten the position." As expected. So when I delete the stop limit and add =OR(AND($J$8 > 0, ID0.SG4@$3 <= $J$9-80), AND($J$8 > 0, CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID1.SG3@4))) the arrows disappear and this is no longer recognized as a BuyExit. I'm certainly no programmer so I'm sure I'm doing something wrong here. Thanks for your help, GH |
[2022-02-08 01:46:52] |
Sawtooth - Posts: 4181 |
Your BuyExit formula CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID1.SG3@4 should be: CROSSFROMBELOW(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID1.SG1@4 check both formulas in your post. You won't get any arrows when flat when referencing $J$8>0 in L3/N3. When using L3/N3 for exits, along with a Trade Window Stop/Target, be sure to set: 'Cancel All Working Orders On Exit' to Yes. |
[2022-02-08 15:09:29] |
GG - Posts: 20 |
My Buy exit and Sell exit were working with that I had it as but only when the stop limit from the attached trade window wasn't turned on. J70 "Cancel all working orders on exit" is set to TRUE (1) but when I press the play button to replay a chart, it switches back to 0. I tried putting your suggestion L3=CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID1.SG1@4) and N3=CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID1.SG1@4) and the exit arrows have now disappeared. |
[2022-02-08 15:30:45] |
Sawtooth - Posts: 4181 |
J70 is read only. It only displays what you set in the spreadsheet study settings. IOW, you cannot change it on the spreadsheet sheet. L3=CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID1.SG1@4) should be: CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID5.SG1@4) N3=CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID1.SG1@4) should be: CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID5.SG1@3:ID5.SG1@4) |
To post a message in this thread, you need to log in with your Sierra Chart account: