I'm doing a day trading (futures) strategy, and I want a candlestick chart that is based on price change, not time or ticks. I need to process at the tick level, because the strategy calls for it, and I need to be able to get out mid-bar. The x-axis of the chart would NOT be linear, because the bars would be based on price fluctuation not time. Conceptually, I could do this myself if I could 1.) get an event for every tick and 2.) 'Build' the bar myself, by tracking the price changes and starting a new bar when the price changes by N amount.
But I'm missing something, because everything in NinjaScript seems to be based off setting up the script settings to a particular time (minute, day) or tick count and then responding to the OnBarUpdate(). This seems backwards for me - I want to control when the bar updates/finishes, based on price. So conceptually, i want an OnTick() event and then a way to form my own candlesticks.
I'm just starting out in all this so i'm probably missing some fundamental concepts, and maybe there's a different way to approach this to get this result. Any suggestions are much appreciated!
Thanks,
buzz
Comment