Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Gap List for Analyzer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Gap List for Analyzer

    I want to display gap up along with the percentage of the gap from yesterdays close to today's open in the MA. I want to subtract the opening price from the closing price but it does not seem to be coming out correctly.

    Value.Set(lastValue);

    if (MarketDataType.Opening>MarketDataType.LastClose)
    {
    double gapUp = MarketDataType.Opening-MarketDataType.LastClose;
    Value.Set(gapUp);
    lastValue = (int)Value[0];
    }
    Last edited by brucelevy; 09-30-2016, 07:36 PM.

    #2
    Hello,

    I believe we had previously discussed something similar involving volume which the last line looks very similar to.

    The reason for this is that the value is being cast to an Int, in this case because it is not a Volume and is a Price it is a double.

    To store the value for a double, you would need to change the private property:

    Code:
    private int lastValue;
    to
    Code:
    private double lastValue;
    And the set would then look like the following:

    Code:
    double gapUp = MarketDataType.Opening-MarketDataType.LastClose;
    Value.Set(gapUp);
    lastValue = Value[0];
    Value[0] by default would be a double


    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    144 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X