Support Board
Date/Time: Wed, 05 Feb 2025 23:54:49 +0000
[Programming Help] - Horizontal Line: Name & Value Display
View Count: 680
[2020-04-07 21:05:12] |
User184576 - Posts: 20 |
Hi, I would like to code both name and value display properties into a custom study. I've only been able to achieve one or the other, but not both simultaneously I assume I'm missing a reference and/or my syntax is incorrect. Any assistance would be appreciated. Thank you! ****************************************************************************************** //Line Attributes //Set Subgraphs To Display Price On Far Right Side Of Chart And Center Vertically //Set Subgraphs To Display Name On Far Left Side Of Chart And Center Vertically PreviousCloseLine.LineLabel = LL_DISPLAY_NAME | LL_NAME_ALIGN_CENTER | LL_NAME_ALIGN_LEFT_EDGE; PreviousCloseLine.LineLabel = LL_DISPLAY_VALUE | LL_VALUE_ALIGN_CENTER | LL_VALUE_ALIGN_FAR_RIGHT; |
[2020-04-08 06:54:25] |
User907968 - Posts: 825 |
Set the name and value properties in a single operation, if you do them separately you are simply overwriting the previous value. PreviousCloseLine.LineLabel = LL_DISPLAY_NAME | LL_NAME_ALIGN_CENTER | LL_NAME_ALIGN_LEFT_EDGE | LL_DISPLAY_VALUE | LL_VALUE_ALIGN_CENTER | LL_VALUE_ALIGN_FAR_RIGHT; Alternatively you could use the |= (or equals) compound assignment operator when assigning the second set of properties PreviousCloseLine.LineLabel = LL_DISPLAY_NAME | LL_NAME_ALIGN_CENTER | LL_NAME_ALIGN_LEFT_EDGE; PreviousCloseLine.LineLabel |= LL_DISPLAY_VALUE | LL_VALUE_ALIGN_CENTER | LL_VALUE_ALIGN_FAR_RIGHT; |
[2020-04-08 13:24:29] |
User184576 - Posts: 20 |
Thank you - I appreciate it!
|
To post a message in this thread, you need to log in with your Sierra Chart account: