Code pour suivre une EMA

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

    Bonjour, pourriez-vous m’aider a configurer les actions suivantes ?

    Grand merci.

    J’aimerais configurer une condition d’entree en achat/vente des que le prix “touche” une moyenne mobile

    et du coup configurer une condition de sortie en vente/achat des que le prix “touche” une autre moyenne mobile.

    Entree et sortie doivent donc suivre l’evolution de ces deux moyennes mobiles.

    Est-ce possible ? Grand merci pour votre aide.

    Cordialement,

    Patrice.

    #225522 quote
    Jean FX
    Moderator
    New

    Un exemple :

    MMOuverturePosition=Average[20](close)
    MMFermeturePosition=Average[50](close)
    
    If not longonmarket and (close crosses over MMOuverturePosition or close crosses under MMOuverturePosition ) THEN
    buy at market
    endif
    
    if onmarket and (close crosses over MMFermeturePosition or Close crosses under MMFermeturePosition ) THEN
    sell at market
    endif
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Code pour suivre une EMA


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
pmattez @pmattez Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Jean FX
2 years, 2 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 11/22/2023
Status: Active
Attachments: No files
Logo Logo
Loading...