Support Board
Date/Time: Mon, 03 Feb 2025 01:13:56 +0000
[Programming Help] - Spreadsheet Study For Trading - referencing other bars
View Count: 543
[2019-10-22 07:00:45] |
Adam Schwartz - Posts: 81 |
I am testing something out with a very simple formula. It buys when prices crosses above MA (referencing bar 4 and 5) AND when close of bar 3 is greater than bar 4. This seems to work fine...no problem here. The problem is inputting a buy exit (sell). Essentially want to do the opposite. When price crosses below MA (referencing bar 4 and 5) AND when close of bar 3 is less than bar 4. I think problem here is that once first part of condition triggers, using bar 4 and 5, the next part of condition references bar 3 and 4, and that condition may not occur on next bars, but rather some n bars in future. In English, what I am trying to say is this (using daily bars): price crosses below MA on Monday. It trades below MA on Tuesday, Wednesday and Thursday, before actually closing below Monday's close on Friday. I want it to trigger an exit on that Friday for example? Is this possible? If so how? Thank you for your help :) |
To post a message in this thread, you need to log in with your Sierra Chart account: