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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #38895 quote
    Carl
    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
    Nicolas
    Keymaster
    Master

    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.

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 Nicolas
8 years, 8 months ago.

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