initialiser une variable après un StopLoss

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #195991 quote
    RoboCodeRoboCode
    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
    NicolasNicolas
    Keymaster
    Legend

    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.
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

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 NicolasNicolas
4 years, 4 months ago.

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