Sharing results between Qscripts? [Semi-Solved]
Posted: Thu Jan 25, 2018 10:19 pm
Hi All,
I have two questions around the feasibility of sharing the results from one Qscript in one chart so that another (and different) Qscript from another chart. My two questions are really around 1) how to do this especially w.r.t locking/reading/writing. and 2) how does one use a system test to test this out?
Using concrete examples, I have two charts open. Chart 1, 30 minute ES. Chart 2, 10 minute ES. I figured I could have the Qscript running in the 30 minute window to just write the result to a file. Then the 10 minute QScript could just read from this. I figured as long as I am doing writing in one, and reading in the other, I should not need to worry about locking? But what if the writing takes a weee bit more time, such that the 10 minute reader goes to check for the results, but misses the update? (since the writing is still theoretically happening. This could be off every 3 bars then.)
My second part of this question is around how one would go about back testing this. My 30 minute QScript was not going to keep history of the data, but I guess that is a work around? (i.e. save data, 1 line for each bar, and just deliminate the data with commas or carets or something.)
thx for any pointers or examples.
PS: I thought about just implementing the 30 minute qscript in the 10 minute qscript (or vice-versa) but unfortunately my algos are not that friendly.
I have two questions around the feasibility of sharing the results from one Qscript in one chart so that another (and different) Qscript from another chart. My two questions are really around 1) how to do this especially w.r.t locking/reading/writing. and 2) how does one use a system test to test this out?
Using concrete examples, I have two charts open. Chart 1, 30 minute ES. Chart 2, 10 minute ES. I figured I could have the Qscript running in the 30 minute window to just write the result to a file. Then the 10 minute QScript could just read from this. I figured as long as I am doing writing in one, and reading in the other, I should not need to worry about locking? But what if the writing takes a weee bit more time, such that the 10 minute reader goes to check for the results, but misses the update? (since the writing is still theoretically happening. This could be off every 3 bars then.)
My second part of this question is around how one would go about back testing this. My 30 minute QScript was not going to keep history of the data, but I guess that is a work around? (i.e. save data, 1 line for each bar, and just deliminate the data with commas or carets or something.)
thx for any pointers or examples.
PS: I thought about just implementing the 30 minute qscript in the 10 minute qscript (or vice-versa) but unfortunately my algos are not that friendly.