Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 02:13:16 +0000



Post From: Spreadsheet System - Capture a value for later use?

[2020-06-19 01:03:17]
j4ytr4der_ - Posts: 918
I've read a bit about using persistent variables in Spreadsheets (thanks tomgilb), but they seem to require that you have values carried over from bar to bar. I just need to store a value when a trade triggers, for later use.

Specifically, I want to have two different trade signals. So my K3 and M3 columns each have a nested IF statement that contains the two triggers. If signal 1 is triggered, the value 1 is displayed. if signal 2 triggers, the value 2 is displayed So far so good.

The trouble is, as soon as the entry condition is no longer valid (which in this case can be a fraction of a second later at times) the entry cell goes back to 0 and I have no way to know which signal was taken. I want to change the target offset from the spreadsheet, only in the case of trigger 2 being taken. That would be easy except that the trigger value of 1 or 2 is gone after the entry so the offset cell has no idea if it should be used or not.

Is there some way to capture the trigger value when it appears, store it on a different cell, then clear it again on exit?

Hope that made sense! =)