Trading with Multiple Timeframe

Forums ProRealTime English forum ProOrder support Trading with Multiple Timeframe

  • This topic has 3 replies, 3 voices, and was last updated 1 year ago by avatarJS.
Viewing 4 posts - 1 through 4 (of 4 total)
  • #212526

    Hi All, I am new here and exploring this software for auto trading. I have a strategy that I look at 10sec, 1m, 3m, 5m and 15m and while all the signal is align i will execute the trade. this is how I do it using eyeball. while i am exploring this i not entire sure if this can be coded if yes anyone any to give me some help please?

    #212528

    Please define the conditions and we will be happy to help.

    Example of a simple strategy that use multiple timeframes:

     

    #212530

    Hi Thanks, sorry i missing out my sample code, I have coded something like this and it was prompting this,

    Error
    AI tmeFarnes used n your code should be multiples of the timeframe used on the chart on which your strategy is applied (the base timeframe)
    For example
    • If you want to mix 15 minute and 10 minute timeframes n your strategy, you should apply the strategy on a 5min chart (because 15 and 10 are multiples of 5).
    • If you want to mix 7 minute and 5 minute  timeframes in your strategy, you should apply the strategy on a 1 minute chart (because 7 and 5 are multiples of 1).

    Sample of the code that i understand from the documentation,

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated

    // Prevents the system from placing new orders on specified days of the week
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0

    timeframe(10 seconds,updateonclose)
    indicator1 = MACDSignal[12,26,9](close)
    c1 = (indicator1 > indicator1[1])
    indicator2 = CCI[20]
    c2 = (indicator2 > indicator2[1])

    timeframe(1 minutes,updateonclose)
    indicator3 = MACDSignal[12,26,9](close)
    c3 = (indicator3 > indicator3[1])
    indicator4 = CCI[20]
    c4 = (indicator4 > indicator4[1])

    timeframe(3 minutes,updateonclose)
    indicator5 = MACDSignal[12,26,9](close)
    c5 = (indicator5 > indicator5[1])
    indicator6 = CCI[20]
    c6 = (indicator6 > indicator6[1])

    timeframe(5 minutes,updateonclose)
    indicator7 = MACDSignal[12,26,9](close)
    c7 = (indicator7 > indicator7[1])
    indicator8 = CCI[20]
    c8 = (indicator8 > indicator8[1])

    IF (c1 AND c2 AND c3 AND c4 AND c5 AND c6 AND c7 AND c8) AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF

    // Stops and targets
    SET STOP pLOSS 20
    SET TARGET pPROFIT 50

     

    #212540
    JS

    Hi

    You can use your code with a time frame of 1, 2, 5 and 10 seconds…

    (10 sec is not a multiple of 3, 4, 6, 7, 8, and 9 seconds)

    1 user thanked author for this post.
Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login