• Resolved niclasto

    (@niclasto)


    Hey Aleksandar,

    there is probably another issue I could need your help with. I display some indices and your plugin accepted all symobls. It even shows the correct price of these indices but it does not show the change in percent. It always shows “0,00 %” even though it changes the price of the given index.

    I have already tried various things: I used both the shortcode “[stock_ticker]” and I also put the symolbs directly into the shortcodes with all parameters. My item template is: %company% %price% %changep%. The number format is the second one but I have already tried each of them.

    Do you have any idea?

    Regards,

    Niclas

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hi @niclasto,

    Unfortunately, AlphaVantage does not provide enough data to calculate change and range for indices (no values for previous trading day). Because of that, calculation error is occurred (division by zero) and no data is saved to database.

    Here is response for ^DWCWAT https://prntscr.com/iugqqm

    I added fallback fix to GitHub development version, but still change and changep will be zero for not fully supported indices (by AlphaVantage). You can get dev version (master branch) from https://github.com/urosevic/stock-ticker/

    Please test that and see do you still have errors in error log on server related to:
    PHP Warning: Division by zero in wp-content\plugins\stock-ticker\stock-ticker.php on line 12597
    and
    WordPress database error Unknown column 'INF' in 'field list' for query INSERT INTO wp_stock_ticker_data

    Cheers,
    Aleksandar

    Thread Starter niclasto

    (@niclasto)

    Hi,

    thank you for your quick answer again.

    I will further try it.

    Regards,

    Niclas

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Does not show change in percent’ is closed to new replies.