Bressert Indikator RSI

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #226626 quote
    JohnScher
    Participant
    Veteran

    Hallo.

     

    Im Traders Magazin Ausgabe 12/2023 wird eine Handelsstrategie beschrieben, die den Bressert-Indikator RSI3 geglättet  mit einem MA3  verwendet. Ich möchte hier nur die Longseite beachten.

    Der Einstieg für Long erfolgt wenn der Indikator die 20er-Linie übersteigt. Der Ausstieg erfolgt beim Kreuzen der 50er Linie.

    Der Einstieg für Short erfolgt beim kreuzen der 80er Linie nach unten. Der Ausstieg beim kreuzen der 50er Linie nach unten.

    Das Ergebnis soll recht brauchbar sein.

     

    Der Autor führt weiter an, dass das Ergebnis verbessert werden kann, indem man den Chaikin Indikator (CV) verwendet.

    CV = ROC(MA (High-Low, 10), 10)
    Die Volatilitätsformel basiert auf dem Hoch und dem Tief
    eines Candlestick. Aus dieser Differenz wird ein Gleitender
    Durchschnitt gebildet mit MA(10). In einem weiteren Schritt
    muss der MA(10) dann in eine klassische Rate-of-Change
    (ROC) mit einer Periode von zehn eingebunden werden

     

    Die Ein- und Ausstiege sind dann wie folgt

    Einstieg Long:
    RSI3M3 kreuzt die 20er-Linie von unten nach oben und CV >0.
    Ausstieg aus der Long-Position:
    RSI3M3 kreuzt die 60er-Linie von unten nach oben.

    Einstieg Short:
    RSI3M3 kreuzt die 80er-Linie von oben nach unten und CV >0.
    Ausstieg aus der Short-Position:
    RSI3M3 kreuzt die 40er-Linie oben nach unten.

     

     

    Ich frage mal die Runde und bitte Euch darum, die 2 Indikatoren hier reinzustellen. Die Indikatoren würden für einen visuellen Backtest völlig genügen. Ich habe so meine Zweifel, dass der Autor, wie von ihm angegeben, eine 72.7%-ige Trefferwahrscheinlichkeit aufweisen kann.

     

     

     

    Die AI von Microsoft hat mir das gebracht, nur RSI3M3 eingebettet.

     

    Python

    //+——————————————————————+
    //| RSI3_EA.mq4 |
    //| Copyright 2024, Microsoft Corporation |
    //| https://www.microsoft.com |
    //+——————————————————————+
    #property copyright “Copyright 2024, Microsoft Corporation”
    #property link “https://www.microsoft.com”
    #property version “1.00”
    #property strict

    //— input parameters
    input int StartHour=9; // Start hour of trading
    input int EndHour=13; // End hour of trading
    input int RSI_Period=3; // RSI period
    input int RSI_Smooth=3; // RSI smoothing factor
    input double RSI_Buy_Level=20; // RSI buy level
    input double RSI_Sell_Level=50; // RSI sell level

    //— global variables
    double RSI_Buffer[];

    //+——————————————————————+
    //| Custom indicator initialization function |
    //+——————————————————————+
    int OnInit()
    {
    //— indicator buffers mapping
    SetIndexBuffer(0,RSI_Buffer,INDICATOR_DATA);
    //— indicator short name
    IndicatorSetString(INDICATOR_SHORTNAME,”RSI3_EA(“+DoubleToStr(RSI_Buy_Level,1)+”,”+DoubleToStr(RSI_Sell_Level,1)+”)”);
    //— initialization done
    return(INIT_SUCCEEDED);
    }

    //+——————————————————————+
    //| Custom indicator iteration function |
    //+——————————————————————+
    int OnCalculate(const int rates_total,
    const int prev_calculated,
    const datetime &time[],
    const double &open[],
    const double &high[],
    const double &low[],
    const double &close[],
    const long &tick_volume[],
    const long &volume[],
    const int &spread[])
    {
    int i,limit;
    double rsi;

    //— check for bars count
    if(rates_total<RSI_Period+1)
    return(0);

    //— counting from 0 to rates_total
    limit=rates_total-prev_calculated;

    //— main loop
    for(i=0; i<limit; i++)
    {
    //— calculate RSI
    rsi=iRSI(NULL,0,RSI_Period,PRICE_CLOSE,i+1);
    RSI_Buffer[i]=iMAOnArray(RSI_Buffer,0,RSI_Smooth,0,MODE_SMA,i);

    //— check for buy signal
    if(RSI_Buffer[i]>RSI_Buy_Level)
    {
    //— check for market position
    if(!PositionSelect(_Symbol))
    {
    //— open long position
    OrderSend(_Symbol,OP_BUY,LotsOptimized(),Ask,3*Point,0,0,”RSI3_EA”,MagicNumber,0,Green);
    }
    }

    //— check for sell signal
    if(RSI_Buffer[i]>RSI_Sell_Level)
    {
    //— check for market position
    if(PositionSelect(_Symbol))
    {
    //— close long position
    OrderClose(PositionGetTicket(),PositionGetLots(),Bid,3*Point,0,Red);
    }
    }
    }

    //— return value of prev_calculated for next call
    return(rates_total);
    }

     

    Damit kann ich nicht viel anfangen.

     

     

     

    Anbei die pdf-files mit der Erläuterung der Strategie, hoffentlich klappt das Hochladen auf  PRT.

    #227181 quote
    gidien
    Participant
    New

    Hier erstmal der Code für die beiden Indikatoren.

    Code 1:

    RSI3M3 = Average[3](RSI[3])
    
    return RSI3M3 AS "RSI3M3" , 20 AS "LONG", 80 AS "SHORT"

     

    Code 2:

    len10 = 10
    CV = ROC[len10 ](Average[len10](range) )
    
    return CV AS "CV", 0 AS "ZeroLine"
    #227188 quote
    gidien
    Participant
    New

    Und hier noch die Strategy:

    len10 = 10
    CV = ROC[len10 ](Average[len10](range) )
    len3 = 3
    RSI3M3 = Average[len3](RSI[len3])
    GoLong = RSI3M3 CROSSES UNDER 20 and CV > 0
    GoShort = RSI3M3 CROSSES OVER 80 AND CV > 0
    
    ExLong = RSI3M3 CROSSES OVER 60 
    ExShort = RSI3M3 CROSSES UNDER 40
    // Bedingungen zum Einstieg in Long-Positionen
    IF NOT LongOnMarket AND GoLong THEN
    BUY 1 CONTRACTS AT MARKET
    ENDIF
    
    // Bedingungen zum Ausstieg von Long-Positionen
    If LongOnMarket AND ExLong THEN
    SELL AT MARKET
    ENDIF
    
    // Bedingungen zum Einstieg in Short-Positionen
    IF NOT ShortOnMarket AND GoShort  THEN
    SELLSHORT 1 CONTRACTS AT MARKET
    ENDIF
    
    // Bedingungen zum Ausstieg aus Short-Positionen
    IF ShortOnMarket AND ExShort  THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // Stops und Targets: Legen Sie hier schützende Stops und Profit Targets fest
    GraHal and JohnScher thanked this post
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Bressert Indikator RSI


ProOrder: Automatischer Handel & Backtesting

New Reply
Author
author-avatar
JohnScher @johnscher Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by gidien
2 years ago.

Topic Details
Forum: ProOrder: Automatischer Handel & Backtesting
Language: German
Started: 01/20/2024
Status: Active
Attachments: 3 files
Logo Logo
Loading...