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 argusthome, 03-08-2026, 10:06 AM
    0 responses
    88 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    48 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    30 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    34 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    68 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X