I wonder if there some way to use c++ IB API for canndlestick patterns. There are functions like "get historical data" etc but they dont return nothing and just output data to concole. I have a few algorithms I backtested in tradingviews Pine Script and they worked very well so I decided to try to test it on IB paper account. Pine Script is very simple to use and there are possibilities to get current and previous bar data like "open", "close" etc easily.
For example:
If (low <= low[1])
strategy.order(id, long, qty, limit, stop, oca_name, oca_type, comment, when)
If (high >= 100)
strategy.exit(id, from_entry, qty, qty_percent, profit, limit, losss, stop, trail_price, trail_points, trail_offset, oca_name, comment, when)
When low of current bar lower than low of previous bar than place order. When high of current bar higher or equal than 100 exit
Is it possible to do the same in IB API? So far I found class called Bar, but it doesn't have any fuction what can return bar prize.
For example:
If (low <= low[1])
strategy.order(id, long, qty, limit, stop, oca_name, oca_type, comment, when)
If (high >= 100)
strategy.exit(id, from_entry, qty, qty_percent, profit, limit, losss, stop, trail_price, trail_points, trail_offset, oca_name, comment, when)
When low of current bar lower than low of previous bar than place order. When high of current bar higher or equal than 100 exit
Is it possible to do the same in IB API? So far I found class called Bar, but it doesn't have any fuction what can return bar prize.