MACD en 15min et en 1 heure

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #90983 quote
    finplusfinplus
    Participant
    Master

    Bonsoir,

    mon programme est tout simple et pourtant je n’arrive pas à le programmer efficacement. Je voudrais qu’une position soit prise (achat ou vente à découvert donc buy or sellshort) lorsqu’en 15 minutes le macd croise sa ligne de signal (par exemple à la hausse) et qu’en timeframe 1 heure le macd soit au dessus de sa ligne de signal.

    quelqu’un pourrait il m’aider sur cette programmation?

    merci d’avance.

    #91080 quote
    NicolasNicolas
    Keymaster
    Legend

    Cela me fait penser à un exemple tout simple de stratégie MTF avec un MACD, sans doute à adapter un chouia ! 🙂

    Voici le lien du sujet où on en parle : https://www.prorealcode.com/topic/echelle-de-temps-multiples/#post-82039

    et l’exemple de code en question :

    defparam cumulateorders=false
    
    timeframe(10 minutes,updateonclose)
    macd10 = MACD[12,26,9](close)
    
    timeframe(5 minutes,updateonclose) //or timeframe(default) on a 5 minutes TF
    macd5 = MACD[12,26,9](close)
    
    condition = macd10>0 and macd5>0
    
    if not longonmarket and condition then
     buy at market
    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

MACD en 15min et en 1 heure


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

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

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