pause suite à limite atteinte

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #50052 quote
    jeromejerome
    Participant
    New
    Bonjour, mon système utilise un flag 0/1 pour détecter des conditions propices au trading. je voudrais remettre ce flag à zéro si la limite d’une position est atteinte, mais qu’il reste à 1 si c’est le stop qui a été touché. je pensais à faire une fonction limiteatteinte qui va calculer l’écart en TRADEPRICE et close et s’il dépasse l’objectif en LONGONMARKET (ou -1 x l’objectif en short) alors désactiver le flag. mais peut être existe-t-il plus simple ? merci et bonne fin de semaine à tous jerome
    #50057 quote
    jeromejerome
    Participant
    New
    finalement le plus simple était de carrément pas passer par le SET TARGET PROFIT, de gérer plutôt la limite dans un IF incluant le changement du flag… mais j’ai l’impression de faire inutilement lourd peut être existe-t-il plus adapté ?
    IF SHORTONMARKET AND ((TRADEPRICE-close) > objectif) THEN
    EXITSHORT AT MARKET
    okgo = 0
    ENDIF
    
    IF LONGONMARKET AND ((close-TRADEPRICE) > objectif) THEN
    SELL AT MARKET
    okgo = 0
    ENDIF
    #54977 quote
    Eric78Eric78
    Participant
    Junior

    Bonjour, 

    Je cherche coder une limite journalière, en points, indépendante des stoploss/profit des trades et indépendante du nombre de trade de la journée.

    avez-vous réussi à coder votre pause suite à limite atteinte en points ? 

    Cordialement

    Eric

    #55848 quote
    jeromejerome
    Participant
    New

    j’ai abandonné car le calcul de la limite atteinte en points renvoie des faux positifs sur les SELL et EXITSHORT.

     

    #56038 quote
    Eric78Eric78
    Participant
    Junior
    Merci pour la réponse. En effet ça paraît compliqué. Alors que pourtant, ça me paraît à moi, néophyte, élémentaire de pouvoir fixer une limite de gains. Est-ce que vous avez réussi à coder une limite en euros ? Cordialement
    #56043 quote
    NicolasNicolas
    Keymaster
    Legend
Viewing 6 posts - 1 through 6 (of 6 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

pause suite à limite atteinte


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
jerome @jerome Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by NicolasNicolas
8 years, 10 months ago.

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