No positions with a weekly multi timeframe strategy

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #94022 quote
    Crillezz
    Participant
    Veteran

    Hello! I have worked with a strategy in several timeframes. Takes buy and sell signal in 1 minute timeframe but only if certain cretaries are met in the weekly timeframe. When I run it in ProOrder in a demo acount it does not take any positions.

    And when I backtest, it needs at least 50000 units to get some signals. How do I solve that problem in ProOrder?

    #94023 quote
    robertogozzi
    Moderator
    Master

    Make conditions easier to be met.

    If you post your code we might be of more help.

    #94138 quote
    Crillezz
    Participant
    Veteran

    Ok here it is.

    That’s just one example. Don’t know how many units ProOrder works with?

     

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    // The system will cancel all pending orders and close all positions at 0:00. No new ones will be allowed until after the "FLATBEFORE" time.
    DEFPARAM FLATBEFORE = 080000
    // Cancel all pending orders and close all positions at the "FLATAFTER" time
    DEFPARAM FLATAFTER = 220000
    
    // Conditions to enter short positions
    indicator1 = RSI[a](close)
    c1 = (indicator1 > s)
    
    TIMEFRAME(weekly,updateonclose)
    indicator11 = Stochastic[6,3](close)
    indicator22 = Average[5](indicator11)
    c2 =(indicator11 < indicator22)
    
    IF (c1 AND c2) THEN
    sellshort 1 CONTRACT AT Market
    ENDIF
    
    // Stops and targets
    SET STOP pTRAILING 45
    SET TARGET pPROFIT 25
    pr1.png pr1.png pr2.png pr2.png
    #94141 quote
    Nicolas
    Keymaster
    Master

    Data history must be loaded for the indicators calculation to be made, that’s why you don’t get signals by reducting the units displayed. Getting weekly timeframe data from  a 1 minute chart needs a lot of bars!

    Crillezz thanked this post
    #94143 quote
    Crillezz
    Participant
    Veteran

    Yes.

    And how do I get ProOrder to work with 50000 bars or more?

    #94248 quote
    Crillezz
    Participant
    Veteran

    Is it possible to get ProOrder to work with more bars?

    #94252 quote
    robertogozzi
    Moderator
    Master

    Maximum allowed by pProOrder is

    DEFPARAM PreloadBars=10000
    Crillezz thanked this post
    #94254 quote
    Nicolas
    Keymaster
    Master

    Roberto is right, but there’s maybe another possibility. I asked ITF about that specific case and i’m waiting for the answer..

    #94257 quote
    Crillezz
    Participant
    Veteran

    Thanks. I want to try a strategy in ProOrder because I can’t back test so far with 1min timeframe. Next version of Prorealtime you can back test longer, right?   🙂

    #94264 quote
    Nicolas
    Keymaster
    Master

    Next version of Prorealtime you can back test longer, right?

    Yes, with 1M bars!

    #94400 quote
    Crillezz
    Participant
    Veteran
    Ok. Now I have tried this code, and I get no signals in ProOrder?
    Please note that I have tried other markets than DAX. There I have signals in my backtest but not in ProOrder.
    DEFPARAM PreloadBars=100000
    
    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    // The system will cancel all pending orders and close all positions at 0:00. No new ones will be allowed until after the "FLATBEFORE" time.
    DEFPARAM FLATBEFORE = 080000
    // Cancel all pending orders and close all positions at the "FLATAFTER" time
    DEFPARAM FLATAFTER = 220000
    
    // Conditions to enter short positions
    indicator1 = RSI[a](close)
    c1 = (indicator1 > s)
    
    TIMEFRAME(weekly,updateonclose)
    indicator11 = Stochastic[6,3](close)
    indicator22 = Average[5](indicator11)
    c2 =(indicator11 < indicator22)
    
    IF (c1 AND c2) THEN
    sellshort 1 CONTRACT AT Market
    ENDIF
    
    // Stops and targets
    SET STOP pTRAILING 45
    SET TARGET pPROFIT 25

     

    #94405 quote
    Vonasi
    Moderator
    Master

    Crillezz – Please try to remember to use the ‘Insert PRT Code’ button when posting code. I have tidied up your post for you. 🙂

    #94406 quote
    GraHal
    Participant
    Master

    I have signals in my backtest but not in ProOrder.

    Over what period have you Forward Tested in Pro Order Auto Trading (I assume that is what you are referring to above when you say Pro Order?)?

    Also you must be a very patient chap to wait all week (using update  on close) to make £25 or am I missing somethng here?? 🙂

    TIMEFRAME(weekly,updateonclose)
    
    SET STOP pTRAILING 45
    SET TARGET pPROFIT 25

     

    EDIT / PS

    I don’t get any trades over 1000 bars on a Weekly TF Backtest with attached in the optimiser for  a and s

    Crill.jpg Crill.jpg
    #94413 quote
    GraHal
    Participant
    Master

    My Backtest above was on the DJI btw.

    Just BT’d on the DAX … same no trades on Weekly TF … not even any zero bar trades also I mean on either DJI or DAX on Weekly TF

    I get trades on DAX on the 1 Hour TF as attached

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

No positions with a weekly multi timeframe strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Crillezz @crillezz Participant
Summary

This topic contains 13 replies,
has 5 voices, and was last updated by GraHal
6 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/19/2019
Status: Active
Attachments: 4 files
Logo Logo
Loading...