ALgo “magical trend + parabolic sar”

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #215644 quote
    FXtonio
    Participant
    New

    Bonjour à tous,

    ci joint un petit système basé sur l’indicateur “Magical trend” trouver sur prt, ainsi que les parabolic sar, en m15 sur le dax.

    spread: 2

    j’ai mis un trailing stop à 19 via la fonction optimisation des variables, mais les points de sorties ne sont pas terrible je trouve, si quelqu’un à une suggestion d’amelioration 🙂

    Bonne journée à tous

    magical-sar-dax-m15.itf Rapport-detaille-magical-sar-dax-m15.png Rapport-detaille-magical-sar-dax-m15.png
    #215647 quote
    FXtonio
    Participant
    New

    ******LE CODE EN QUESTION ******

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = False // Cumul des positions désactivé
    
    // Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position avant l'heure spécifiée
    ONCE sl = 19.0
    noEntryBeforeTime = 080000
    timeEnterBefore = time >= noEntryBeforeTime
    
    // Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position après l'heure spécifiée
    noEntryAfterTime = 163000
    timeEnterAfter = time < noEntryAfterTime
    
    // Empêche le système de placer de nouveaux ordres sur les jours de la semaine spécifiés
    daysForbiddenEntry = OpenDayOfWeek = 5 OR OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Conditions pour ouvrir une position acheteuse
    indicator1 = CALL "MAGICAL TREND"(close)
    c1 = (close[1] CROSSES OVER indicator1)
    indicator2 = SAR[0.02,0.02,0.2]
    c2 = (close > indicator2)
    indicator3 = SAR[0.05,0.05,0.5]
    c3 = (close > indicator3)
    
    IF (c1 AND c2 AND c3) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    BUY 0.5 CONTRACT AT MARKET
    ENDIF
    
    // Conditions pour ouvrir une position en vente à découvert
    indicator4 = CALL "MAGICAL TREND"(close)
    c4 = (close[1] CROSSES UNDER indicator4)
    indicator5 = SAR[0.02,0.02,0.2]
    c5 = (close < indicator5)
    indicator6 = SAR[0.05,0.05,0.5]
    c6 = (close < indicator6)
    
    IF (c4 AND c5 AND c6) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    SELLSHORT 0.5 CONTRACT AT MARKET
    ENDIF
    
    // Stops et objectifs
    SET STOP pTRAILING sl
    #216281 quote
    FXtonio
    Participant
    New

    Bonjour à tous,

    est ils possible de coder un stop suiveur qui suivrait les points du sar?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

ALgo “magical trend + parabolic sar”


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
FXtonio @fxtonio Participant
Summary

This topic contains 2 replies,
has 1 voice, and was last updated by FXtonio
2 years, 8 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 06/05/2023
Status: Active
Attachments: 2 files
Logo Logo
Loading...