I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

Reply To: ? – Exchange Chart Timeframe

dashed-slug.net Forums Exchange extension support ? – Exchange Chart Timeframe Reply To: ? – Exchange Chart Timeframe

#5112
alexg
Keymaster

Hello Megan,

This is not currently easy to do.

Actually I am currently working on a big change that will allow shortcodes to do things like that.

First I will roll out these changes to the parent plugin, possibly later today if all goes well, or early within the week.

After that, I will apply similar changes to the Exchange extension. I will try to do this as well.

In any case, the timeframe can be controlled via JavaScript. To set the knockout observable to 1 hour candlesticks, you would do:

wp.wallets.viewModels.walletsExchangeChart.selectedTimeframe('1h');

You could attach this to the wallets_exchange_ready bubbling event, like so:

$( 'html' ).on( 'wallets_exchange_ready', function( event, markets ) {
    wp.wallets.viewModels.walletsExchangeChart.selectedTimeframe('1h');
} );

The available timeframes are: ‘1m’, ‘3m’, ‘5m’, ’15m’, ’30m’, ‘1h’, ‘4h’, ‘1d’, ‘1w’

Hope this helps.

with regards