prt ne valide pas mon code à cause du return , pouvez vous m’aider

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #207937 quote
    rubeshrubesh
    Participant
    New

    prt ne valide pas mon code à cause du return:

     

    #include <iostream>
    #include <vector>

    double movingAverage(const std::vector<double>& data, int period) {
    double sum = 0.0;
    for (int i = 0; i < period; i++) {
    sum += data[i];
    }
    double average = sum / period;
    return average;
    }

    int main() {
    std::vector<double> data = {1.0, 2.0, 3.0, 4.0, 5.0};
    int period = 3;
    std::cout << “Moyenne mobile : ” << movingAverage(data, period) << std::endl;
    return 0;
    }

    #207938 quote
    NicolasNicolas
    Keymaster
    Legend

    Ceci est du code C++, on ne programme pas dans ce langage avec ProRealTime. On utilise un code propriétaire appelé le ProBuilder ou le ProRealCode aussi désormais 🙂

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

prt ne valide pas mon code à cause du return , pouvez vous m’aider


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
rubesh @rubesh Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
3 years, 7 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/23/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...