Erreur codage Break even

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #201810 quote
    claschclasch
    Participant
    Senior

    Bonjour,

    J’ai voulu codé un “Break even” de cette façon :

    //If Longonmarket and (Close-Tradeprice)*100/Tradeprice >= 0.4 then
    //Sell at Tradeprice Stop
    //Endif

    Mais celui-ci provoque une erreur (division par zéro) et arrête donc l’algorithme.

    Est-ce que quelqu’un aurait une idée pour un code correct ?

    Merci d’avance.

    Bonne journée,

    Claudio

    #201826 quote
    claschclasch
    Participant
    Senior

    J’ai trouvé !

    Voici le code qui fonctionne :

    If Longonmarket then
     If ((Close-Tradeprice)*100)/Tradeprice >= 0.4 then
      Sell at Tradeprice Stop
     Endif
    Endif
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

Erreur codage Break even


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
clasch @clasch Participant
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by claschclasch
4 years, 1 month ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 10/03/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...