Entry days for Weekly trading system

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44180 quote
    andreag76andreag76
    Participant
    Average
    Hello to everyone, I have set several codes for working with weekly timeframes. 
    The problem is that they never start trading from autotrading proorders.
    #44185 quote
    DespairDespair
    Blocked
    Master

    Can you post an example?

    #44193 quote
    andreag76andreag76
    Participant
    Average

    Good morning, I would like to program an Ts in this way:

    Enter long if the price is higher than the last candle last week

    Enter short if the price is below the minimum candle last week

    I have programmed it as code below but it does not work, can anyone tell me why and how to fix it? Thanks so much

     

     

     

     

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate

    // Impedisce al sistema di tradare in giorni specifici della settimana
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0

    // Condizioni per entrare su posizioni long
    c1 = (close > DHigh(1)[1])

    IF c1 AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF

    // Condizioni per entrare su posizioni short
    c2 = (close < DLow(1)[1])

    IF c2 AND not daysForbiddenEntry THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF

    // Stop e target
    SET STOP $TRAILING 160

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

Entry days for Weekly trading system


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
andreag76 @andreag76 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by andreag76andreag76
9 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/18/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...