Graphics

 View Only
  • 1.  Stock prices - changing quad based on DataLinq

    Posted 11-04-2017 20:09
    I am working for a company that concentrates on stock prices. I need to use datalinq to show a red quad for below opening price, a green quad for above opening price or a black quad for equal to opening price. Would I use scripting or visual logic for this? I read through previous forums but can't quite find what I'm looking for. Any feedback would be greatly appreciated.


  • 2.  RE: Stock prices - changing quad based on DataLinq

    Posted 11-07-2017 15:21
    You can definitly use VL for this. How do you get your data? Via XML? Is there a field where the opening price stays static? That would make this easier.

    Edit: Off the top of my head, look for posts regarding basketball shot clocks, where when the timer goes below a certain digit, the color of the quad changes. Then replace the specific digit with the opening stock quote.
    #XPression


  • 3.  RE: Stock prices - changing quad based on DataLinq

    Posted 11-07-2017 18:56
    We get our data via RSS feed. And upon further research, we would want to use the closing price from the previous day (and that would be static).
    #XPression


  • 4.  RE: Stock prices - changing quad based on DataLinq

    Posted 11-07-2017 21:35

    @Stashmark I created a quick demo for you. I basically made two quads and two text boxes. Compare against the close quote and turn the visibility of the quads on or off.


    #XPression


  • 5.  RE: Stock prices - changing quad based on DataLinq

    Posted 11-08-2017 11:55
    This works great! Thank you MiaSanMiaUSA!
    #XPression


  • 6.  RE: Stock prices - changing quad based on DataLinq

    Posted 12-07-2017 16:36
    A follow up on this scene... I now want to make a third text field change colors instead of quads. I need to add in a white text if the values are even. Do I need three separate text fields (green, red and white visibility) or can I just use the materials Font option in visual logic?

    #XPression


  • 7.  RE: Stock prices - changing quad based on DataLinq

    Posted 12-08-2017 03:24
    You can use the Font materials option in visual logic, but you'll have to use an input selector block to decide which material gets used.
    #XPression


  • 8.  RE: Stock prices - changing quad based on DataLinq

    Posted 12-08-2017 11:46
    Any ideas in visual logic about the text = white for equal values? I have my visual logic set up for greater than = green and not = red. I just can't figure out how to make text white when values are equal.
    #XPression


  • 9.  RE: Stock prices - changing quad based on DataLinq

    Posted 12-08-2017 17:09

    Please see photo for VL. If you want to take it further you'll see I answered something very similar here.
    https://discussions.rossvideo.com/forum/default-forum-gc1/xpression-cg-and-graphics-system-gc12/13761-default-material-color-with-coding


    #XPression


  • 10.  RE: Stock prices - changing quad based on DataLinq

    Posted 12-09-2017 02:50
    This works great! Thank you everyone for your help!
    #XPression