Periode zwischen zwei Ereignisse

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #185608 quote
    VjperVjper
    Participant
    Junior

    Hallo,

    ich habe folgende Herausforderung.

    Im folgenden möchte ich das höchste hoch zwischen zwei Ereignisse bestimmen.

    Beispiel:

    MACD Histogramm kreuzt von unten nach oben 0 (erstes Ereignis)

    MACD Histogramm kreuzt von oben nach unten 0 (zweites Ereignis)

    Wie kann ich das höchste Hoch zwischen den zwei Ereignissen codieren?

    defparam drawonlastbaronly = true
    
    MyMACD = MACD[50,200,28](close)
    start1 = myMACD CROSSES OVER 0
    if start1 = 1 then
    start1 = barindex[start1]
    endif
    
    ende1 = myMACD CROSSES under 0
    if ende1 = 1 then
    ende1 = barindex[ende1]
    endif
    
    
    
    return start1,ende1
    #185611 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    MaxMacd behält den höchsten Wert zwischen den beiden Ereignissen:

    MyMACD = MACD[50,200,28](close)
    if myMACD CROSSES OVER 0 then
       Macd1 = myMACD
    Endif
    if myMACD CROSSES under 0 then
       Macd2 = myMACD
    Endif
    maxMACD = max(Macd1, Macd2)
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Periode zwischen zwei Ereignisse


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
Vjper @vjper Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
4 years, 8 months ago.

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 01/16/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...