Copper 220 min strategy

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #257202 quote
    AragornaAragorna
    Participant
    Average

    Hello, I found this strategy for copper made for trade station. Is it possible to conver it ?

    many thanks in advance

    Alex


    #257209 quote
    AragornaAragorna
    Participant
    Average

    in attachment picture

    Copper-strategy-3.png Copper-strategy-3.png
    #257210 quote
    SnålänningenSnålänningen
    Participant
    Average

    I have not tested this, courtesy of Gemini…. Try it!


    // --- Inställningar ---
    DEFPARAM CumulateOrders = False
    
    
    channel = 5
    stochPeriod = 5
    timeout = 20
    riskAmount = 3500 // Belopp i din kontovaluta
    
    
    // --- Indikatorer ---
    // momentumx = SlowD i EasyLanguage motsvarar ofta StochasticD i PRT
    momentumx = StochasticD[stochPeriod, 3, 3](close)
    midpointx = (Average[channel](high) + Average[channel](low)) / 2
    
    
    // --- Filter ---
    // Filter #615
    f615 = (ADX[14] > 25 AND RSI[14](close) < 50 AND AverageTrueRange[14](close) > AverageTrueRange[14](close)[1])
    // Filter #858
    f858 = (close < close[2] AND close[2] < close[1])
    
    
    // --- Long Entry ---
    IF NOT f615 THEN
        IF close < midpointx AND momentumx > momentumx[1] THEN
            BUY 1 CONTRACT AT MARKET
        ENDIF
    ENDIF
    
    
    // --- Short Entry ---
    IF NOT f858 THEN
        IF close > midpointx AND momentumx < momentumx[1] THEN
            SELLSHORT 1 CONTRACT AT MARKET
        ENDIF
    ENDIF
    
    
    // --- Exits & Risk Management ---
    
    
    // 1. Fixed Stop Loss & Profit Target
    SET STOP $LOSS riskAmount
    SET TARGET $PROFIT (2 * riskAmount)
    
    
    // 2. Time-based Exit
    IF LongOnMarket AND (BarIndex - TradeIndex >= timeout) THEN
        SELL AT MARKET
    ENDIF
    
    
    IF ShortOnMarket AND (BarIndex - TradeIndex >= timeout) THEN
        EXITSHORT AT MARKET
    ENDIF
    
    
    // 3. Trailing Stop vid vinst (1x risk)
    // Beräknar flytande vinst i pengar
    IF LongOnMarket AND (PositionPerformance * PositionPrice * CountOfPosition >= riskAmount) THEN
        SELL AT lowest[4](low) STOP
    ENDIF
    
    
    IF ShortOnMarket AND (ABS(PositionPerformance) * PositionPrice * CountOfPosition >= riskAmount) THEN
        EXITSHORT AT highest[4](high) STOP
    ENDIF
    
    Nicolas thanked this post
    #257255 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    PositionPerformance shall be changed into PositionPerf, I think.


    #257264 quote
    AragornaAragorna
    Participant
    Average

    Hi, thanks for the conversion. Unfortunately there must be more mistakes in conversion because performance are totally different from what I see in the future of Copper 1440 minutes for trade station.


    Alessio

Viewing 5 posts - 1 through 5 (of 5 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

Copper 220 min strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Aragorna @aragorna Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by AragornaAragorna
7 months, 3 weeks ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/01/2026
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...