OnTick event for Indicator
OnTick event for Indicator
08 Jun 2020, 19:03
Is there a method for retrieving the OnTick event in an Indicator?
I can use MarketData.GetTicks() to populate initially but the Tick event never fires.
I've also tried Symbol.Tick event with no success though the MarketData.GetTicks() Tick event is better because it also returns the Time with the Bid and Ask prices.
I’m trying to run the Indicator on other time frames while still processing the Tick data along with accessing the Bid and Ask values.
Any suggestions on how to do it without running through a Robot?
Replies
YrpWayne
11 Jun 2020, 14:45
Thanks PanagiotisCharalampous,
Ended up been a typo in a referenced project which the debugger wasn't picking up causing my main issue. That said Bars.Tick() worked for triggering on tick, Thanks.
It's probably worth mentioning that the Tick event returns the Bars object instead of the Tick event. If you want to access the Bid and Ask values you have to use the properties on the indicator.
I'll probably give the MarketData.GetTIcks() Tick event another go as it returns the Bid and Ask which is useful if you're referencing different symbols than what the indicator references.
@YrpWayne
PanagiotisCharalampous
09 Jun 2020, 10:28
Hi YrpWayne,
Did you try subscribing to the Bars.Tick() event?
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous