darwinex / dwxconnect

Seamlessly link any Trading Strategy in ANY programming language to Darwinex liquidity via MetaTrader 4 or 5. DWX Connect is your very own, fully customizable Trading API!
BSD 3-Clause "New" or "Revised" License
158 stars 84 forks source link

missing in "market_data" #40

Open prozor7 opened 10 months ago

prozor7 commented 10 months ago

I believe that the "High" and "Low" price information is the most important piece of information in daily market data (current-day).

Only "Bid" and "Ask" are available as information "on_tick" at the moment. We should have a function called "on_tick_daily", is what I propose. Open, High, Low, and Bid

Please point me in the right direction if I'm missing how to access those four bits of data using the on_tick method.

regards

elvinex commented 4 months ago

Hi, Sorry for the late reply. Open/High/Low/Close is only available using bars, not ticks. Ticks are defined as only bid/ask. You could subscribe to bar data like this:

self.dwx.subscribe_symbols_bar_data([['EURUSD', 'D1'], ['GBPUSD', 'D1']])

Then the on_bar_data() function should trigger when there is a new bar.