Easy strategy not working

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #253991 quote
    ModoGG
    Participant
    New

    Hi,

    I created a very easy strategy for PRT

    // ===== PARAMETERS =====
    emaPeriod = 30   //
    
    // ===== INDICATORS =====
    ema30 = ExponentialAverage[emaPeriod](close)
    
    // ===== TIME FILTER (Berlin 14:00-18:00) =====
    tradeTime = (time >= 140000 AND time <= 180000)
    
    // ===== ENTRY CONDITION =====
    crossAbove = close crosses over ema30
    
    // ===== RESET WHEN FLAT =====
    IF NOT longonmarket THEN
    secondEntryTaken = 0
    thirdEntryTaken  = 0
    ENDIF
    
    
    // ===== FIRST ENTRY =====
    IF NOT longonmarket THEN
    IF tradeTime AND crossAbove THEN
            
    entry1 = close
            
    // Levels for averaging entries
    entry2Trigger = entry1 * 0.975     // -2.5%
    slTotal       = entry1 * 0.90      // -10% stop
            
    BUY 0.05 CONTRACT AT MARKET
    ENDIF
    ENDIF
    
    
    // ===== SECOND ENTRY =====
    IF longonmarket AND secondEntryTaken = 0 THEN
    IF close <= entry2Trigger THEN
            
    entry2 = close
    secondEntryTaken = 1
            
    // Third entry trigger (another -2.5% drop)
    entry3Trigger = entry2 * 0.975
            
    BUY 0.05 CONTRACT AT MARKET
    ENDIF
    ENDIF
    
    
    // ===== THIRD ENTRY =====
    IF longonmarket AND secondEntryTaken = 1 AND thirdEntryTaken = 0 THEN
    IF close <= entry3Trigger THEN
            
    entry3 = close
    thirdEntryTaken = 1
            
    BUY 0.05 CONTRACT AT MARKET
    ENDIF
    ENDIF
    
    
    // ===== EXIT LOGIC =====
    IF longonmarket THEN
        
    // Determine how many positions are open and compute average price
    IF thirdEntryTaken = 1 THEN
    avgPrice = (entry1 + entry2 + entry3) / 3
    ELSIF secondEntryTaken = 1 THEN
    avgPrice = (entry1 + entry2) / 2
    ELSE
    avgPrice = entry1
    ENDIF
    
    // Combined +3% target based on average price
    tpCombined = avgPrice * 1.03
    
    // ---- TAKE PROFIT ----
    IF close >= tpCombined THEN
    SELL AT MARKET
    ENDIF
    
    // ---- STOP LOSS (based on first entry) ----
    IF close <= slTotal THEN
    SELL AT MARKET
    ENDIF
    ENDIF
    

    (very new o the platform). Somehow it does not open any trade. I just want to try this strategy on the tester and go from it…Any help is highly appreciated!

    #253994 quote
    GraHal
    Participant
    Master

    Try below (0.05 Contracts is below minimum allowed)…

    BUY 1 CONTRACT AT MARKET
    Iván González and ModoGG thanked this post
    #253995 quote
    GraHal
    Participant
    Master

    0.5 Contracts may be okay also.

    ModoGG thanked this post
    #253997 quote
    Iván González
    Moderator
    Master

    Exactly. Just as @GraHal says.

    GraHal and ModoGG thanked this post
    2025-11-26_18-52.png 2025-11-26_18-52.png
    #254008 quote
    ModoGG
    Participant
    New

    Thank you very much for your help guys, it was much appreciated! I just have another question regarding the strategy above. How difficult it will be to remove the stop loss and add to the (SL) level an Hedge order with the double quantity of lots previously open? In this case I will also need an averaging Take Profit that consider all open positions…Just an idea for now. Thx in advance for your inputs.

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

Easy strategy not working


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
ModoGG @modogg Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/26/2025
Status: Active
Attachments: 1 files
Logo Logo
Loading...