initialiser une variable après un StopLoss

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

    Bonjour à tous

    J’aimerais savoir s’il est possible de réinitialiser une variable (comme on le fait dans une boucle conditionnelle comme un “if” ou autre) une fois qu’un StopLoss genre  “SET Stop pLoss tradeprice*0.015 ” à été déclanché ?

    Cette action étant isolée dans le code (moi je le mets en tête) et n’appartenant pas à une boucle, comment faire ?

    Sinon, peut on intégrer ce StopLoss dans une boucle conditionnelle ?

    Merci pour votre temps

    #196282 quote
    Nicolas
    Keymaster
    Master

    Pour savoir si un stoploss a été déclenché, on peut tester sur la bougie courante si le STRATEGYPROFIT est inférieure à celui de la bougie qui précède :

    if strategyprofit<strategyprofit[1] then 
     //faire quelquechose
    endif
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

initialiser une variable après un StopLoss


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
RoboCode @brent38 Participant
Summary

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

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