Gold_CCI_EMA_Long Strategy

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #118609 quote
    imokdesign
    Participant
    Senior

    Hi everybody. I want to introduce quickly a not quite perfect gold strategy here, which came about rather accidentally. I had read that the price of gold was rising on Fridays (hedging institutional and purchases of physical gold for further processing) statistically above average (I think similar strategies already exist in this forum). That’s why wanted to buy Thursday evening and sell Friday evening if the Price is lower then the Buyprice. If the Price is highter i wanted to sell it too, or make a breakeven and try Build positions on every Thursday hoping to catch the long trend with a Trailingstop on every Trendwave low (classic trendstop).  But I lack the knowledge about these stops. So I only worked with the time stop. But that didnt work.

    It is important to me to buy at the bottom of this day (Thursday), so I used the CCI indicator at 1htimeframe. I also use an EMA. But that also didnt work. then i checked all other days (not weekend) and had to find out, that on Tues, Wednesday and Thursday in this consterlation the Price was rising. Exactly on the days that I didn’t want to act, lol …

    okay, to cut a long story short, here ist the Code of the Stratgie. Hope i did not optimize the EMA just for these 5 Jears. I used a Spread of 1pip.

    Maybe someone here had a similar idea or suggestions for improvement. 🙂

    // Festlegen der Code-Parameter
    DEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert
    
    // Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen vor einer bestimmten Uhrzeit
    noEntryBeforeTime = 080000
    timeEnterBefore = time >= noEntryBeforeTime
    
    // Verhindert das Platzieren von neuen Ordern zum Markteintritt oder Vergrößern von Positionen nach einer bestimmten Uhrzeit
    noEntryAfterTime = 170000
    timeEnterAfter = time < noEntryAfterTime
    
    // Verhindert das Trading an bestimmten Wochentagen
    daysForbiddenEntry = OpenDayOfWeek = 1 OR OpenDayOfWeek = 5 OR OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Bedingungen zum Einstieg in Long-Positionen
    indicator1 = CCI[20]
    c1 = (indicator1 CROSSES OVER -100)
    indicator2 = ExponentialAverage[18](close)
    c2 = (indicator2 > close)
    
    IF (c1 AND c2) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Bedingungen zum Ausstieg von Long-Positionen
    indicator3 = CCI[20]
    c3 = (indicator3 CROSSES UNDER 100)
    
    IF c3 THEN
    SELL AT MARKET
    ENDIF
    
    // Stops und Targets
    SET STOP %LOSS 10
    
    Bildschirmfoto-2020-02-03-um-01.44.03.png Bildschirmfoto-2020-02-03-um-01.44.03.png
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Gold_CCI_EMA_Long Strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
imokdesign @imokdesign Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/04/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...