KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ How to use scan to obtain cumulative value of a function Reply To: How to use scan to obtain cumulative value of a function

  • rgiu70

    Member
    October 24, 2024 at 1:21 pm

    thank you very much for your time.

    Like this is what i need:

    v:{[x;f;l;h] c:distinct x,f;c where not c within (l;h)};

    For example, here (from the photos uploaded), the levels (above 3000 volumes, previously filtered) are no longer reached for some time, so they must remain in the cumulative list of naked levels. The first time the price crosses these levels, they should be removed from the cumulative list.

    Why do I want to identify these levels? Because I want to “trigger” potential reversal signals only if they occur within a range (with a margin) around these naked levels.

    Thank you again for your guidance and your time.

    Giulio