Rather than waiting till some event occurs, say a TurnUp in a computed series, I want to place a conditional order that would execute during the current bar if the price series reaches a value such that the computed series will have turned.
One way to do it is to reverse engineer the computed series, which isn't always possible.
Another is to take the current bar's closing price, increment it by some value, say 0.01, and recompute the series, repeating until the computed series has reached some threshold value. Then I can place the conditional order using a BuyAtStop.
The problem I run into is that the value of the computed series doesn't seems to change. I'm guessing there's some sort of caching going on.
The following is a simple example which takes the rsi of a smoothed price series (using iirsmoother).
When I do a PrintDebug (with Flushing) I see that UC[bar] and DC[bar] change as they should but AUC and ADC are unchanged, which causes my code to loop unchecked.
CODE:
Please log in to see this code.
Thanks.