Forum FlexPro – Discuss your topic!

Extract data around extrema

Home > Community > FPScript > Extract data around extrema

Ansicht von 4 Beiträgen - 1 bis 4 (von insgesamt 4)
  • Autor
    Beiträge
  • #12726
    Anonym
    Gast

    Hello,

    I’d like to extract data before and after 1000 from extrema.

    I created following formula but it doesn’t work.

    Dim myP = GlobalExtrema(‘Dataset1’,EVENT_POSITIVE,EVENT_INDEX)
    Dim S, F
    S = myP – 1000
    F = myP + 1000
    ‘Dataset1′[S, F]

    Please tell me what’s wrong with it 😥

    Masahiro

    #8390
    Anonym
    Gast

    Hello,

    I’d like to extract data before and after 1000 from extrema.

    I created following formula but it doesn’t work.

    Dim myP = GlobalExtrema(‘Dataset1’,EVENT_POSITIVE,EVENT_INDEX)
    Dim S, F
    S = myP – 1000
    F = myP + 1000
    ‘Dataset1′[S, F]

    Please tell me what’s wrong with it 😥

    Masahiro

    #9185
    Bernhard KantzBernhard Kantz
    Teilnehmer

    The GlobalExtrema-function returns a data series with the indices. Therefore you have to change your FPScript formula as follows:

    Dim myP = GlobalExtrema(‘Dataset1’, EVENT_POSITIVE, EVENT_INDEX)[0]

    support@weisang.com

    #9186
    Anonym
    Gast

    Thank you.

    Now it works fine!

Ansicht von 4 Beiträgen - 1 bis 4 (von insgesamt 4)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.