Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 04:34:39 +0000



[Programming Help] - Bar/Time based exit code for spreadsheet trading

View Count: 942

[2018-08-10 18:25:22]
User214478 - Posts: 2
Been using Sierra for almost two years and to this day still can't figure this out. It seems a basic function but can't for the life of me figure it out.

I'd like to use passage of time in bars as my exit code. For example, after a trade fires based on entry code, the exit would be X amount of bars later, say 4-6 bars later, and on the close of 4th-6th bar the trade would exit.


I've gotten this far with this amazing support board, reverse engineering user contributed studies and code, and even trying to teach myself C++.

As the spreadsheet even keeps track of each bar based on the row, Perhaps some kind of counter function?

This feature has become essential to the many of the trading systems I"m building and hopefully it's doable and this final hurdle can be conquered.

Thanks in advance,

Justin
[2018-08-11 00:31:10]
Sawtooth - Posts: 3992
Here are some examples of counting bars since an entry:
Spreadsheet Example Formulas and Usage: Cancel an Unfilled Order After n Bars

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

Login

Login Page - Create Account