Erreur codage Break even

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #201810 quote
    clasch
    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
    clasch
    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.

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 clasch
3 years, 5 months ago.

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