Indicator Supertrend multi time frame

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #229053 quote
    clovis69
    Participant
    New

    Bonjour,

    Je souhaiterais coder un indicateur super trend en multitimeframe, je souhaiterais obtenir une représentation de l’indicateur supertrend de la  période une minute sur un graphique en période 10 secondes.

    Je suis novice en codage, j’ai donc fait appel à chatGPT pour m’aider à générer un code, malheureusement plusieurs erreurs s’affiche dans la fenêtre de dialogue, cela à l’air d’être des erreurs syntaxiques mais je ne m’y connais pas assez pour en être certain .

    Voici le code :

    // Declaration of parameters
    Parameter: Period1min = (10) // Period for calculation on 1 minute
    Parameter: Multiplier = (1.5)// ATR multiplier

    // Calculation of ATR on 1-minute period
    Variable:// Declaration of parameters
    Parameter: Period1min = 10; // Period for calculation on 1 minute
    Parameter: Multiplier = 1.5; // ATR multiplier

    // Calculation of ATR on 1-minute period
    Variable: ATR1min(0);
    ATR1min = AverageTrueRange[Period1min](High, Low, Close);

    // Calculation of SuperTrend on 1-minute period
    Variable: ST1min(0);
    Variable: UpperBand1min(0);
    Variable: LowerBand1min(0);
    ST1min = SuperTrend[Period1min, Multiplier](Close);
    UpperBand1min = ST1min + (Multiplier * ATR1min);
    LowerBand1min = ST1min – (Multiplier * ATR1min);

    // Displaying SuperTrend and bands on 1-minute period
    DrawLine: ST1min(“ST 1min”), Blue;
    DrawLine: UpperBand1min(“UpperBand 1min”), Green;
    DrawLine: LowerBand1min(“LowerBand 1min”), Green;

    Si vous avez des conseils et ou si tout est reprendre je suis ouvert aux commentaires.

    Merci d’avance,

    #229066 quote
    Alain
    Participant
    Senior

    Bonjour. Voilà qui devrait faire l’affaire :

     

    TIMEFRAME(1 Minute,UPDATEONCLOSE )
    ST = Supertrend[1.5,10] 
    
    TIMEFRAME(Default)
    
    RETURN ST as "SuperTrend M1"
    #229708 quote
    clovis69
    Participant
    New

    Hello,

    Thanks ! that works good !

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Indicator Supertrend multi time frame


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
clovis69 @clovis69 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by clovis69
1 year, 11 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 03/01/2024
Status: Active
Attachments: No files
Logo Logo
Loading...