Hi all,
I'm trying to backtest a strategy that buys and sells under certain conditions in the moment. I mean, I don't want to wait for a condition and then buy or sell on the next bar. When the condition is met, I want the buy or sell order to take place immediately.
Can anyone tell me if that's possible to program into ToS? It's driving me nuts trying to figure it out.
For example, I want to test for a certain condition, then when that condition is hit, calculate 95% of the current price and set an order to buy at that price. I then want to test for a condition to be met on an indicator and when that condition is met, sell immediately, not on the next bar.
Is this possible?
I'm trying to backtest a strategy that buys and sells under certain conditions in the moment. I mean, I don't want to wait for a condition and then buy or sell on the next bar. When the condition is met, I want the buy or sell order to take place immediately.
Can anyone tell me if that's possible to program into ToS? It's driving me nuts trying to figure it out.
For example, I want to test for a certain condition, then when that condition is hit, calculate 95% of the current price and set an order to buy at that price. I then want to test for a condition to be met on an indicator and when that condition is met, sell immediately, not on the next bar.
Is this possible?