Système achat/vente 2ème bougie+MACD

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38895 quote
    CarlCarl
    Participant
    Average

    Ci-dessous une demande qui a été envoyée à ProRealTime :

    Demande pour un systeme en trading auto

    Ouverture à 9h et fermeture à 18h

    CONDITION ACHAT
    à l’ouverture de la 2eme bougie DMI + MACD Haussier

    CONDITION VENTE
    à l’ouverture de la 2eme bougie DMI + MACD Baissier

    STOP à 40 points

    Target à 20 points

     Et une proposition de réponse : 

    DefParam CumulateOrders = False
    DefParam FlatBefore = 090000
    DefParam FlatAfter = 180000
    
    SD = STD[5](Close)
    ASD = Average[10](SD)
    dmi = ROUND(14 / (SD/ASD))
    m = MACDline[12,26,9](Close)
    s = m - MACD[12,26,9](Close)
    
    buySignal = (dmi > dmi[1]) and (m > m[1])
    sellSignal = (dmi < dmi[1]) and (m < m[1])
    
    If LongOnMarket and m Crosses Under s then
       Sell At Market
    Elsif ShortOnMarket and m Crosses Over s then
       ExitShort At Market
    Endif
    
    If buySignal[1] then
       Buy 1 Contract At Market
    Elsif sellSignal[1] then
       SellShort 1 Contract At Market
    Endif
    
    Set Stop PLoss 40
    Set target pprofit 20

     

    Nicolas thanked this post
    #38905 quote
    NicolasNicolas
    Keymaster
    Legend

    J’ai ajouté le target à 20 points dans le code pour info.

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

Système achat/vente 2ème bougie+MACD


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Carl @carl Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/23/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...