Wanting to use 1 minute TF in a daily strategy

Forums ProRealTime English forum ProOrder support Wanting to use 1 minute TF in a daily strategy

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • #88727

    Hi!

    I am not an experienced user and are just starting to dig into this new feature timeframes (as well as coding in general with PRT).

    Right now I am working on a program that will use two signals for entering a long position: when RSI is lower than 10 and when Bollinger Band Width (BBW) is greater than 0.20.
    Therefore, I want the data from the daily TF for acknowledging when the market is about to close and my two conditions are fulfilled.
    If they are fulfilled and the market is about to close (17:25:00) i want to take position just before that (17:23:00) in order to be set for the next day in case of a gap. I do not want to take a position the day after my two signals allign. Also, I want to sell 5 days after the position has been taken, will the tradeIndex be reset after selling? These two (barIndex and tradeIndex has a few questionmarks around them regarding how it will work when excecuting the program)

    Here is where the trouble comes. I get the “All timeframes used in your code should be multiples of the timeframe used on the chart on which your strategy is applied (the base timeframe)”.
    Last time I checked 1 day is a multiple of 1 minute and therefore my question stands: what am i doing wrong matching up these different timeframes and will there be any problems with how I intended the program to work?

    Many thanks!

    SimpaG

     

    #88730

    I cannot spot TIMEFRAME(Daily) in your code?

    You didn’t tell us many details, what was the TF on your chart? I must assume there’s no DAILI TF because you launched your strategy from a DAILY chart, which is not correct!

    The TF on chart, also called main or default TF, is the one that rules and MUST be the smallest one used! BariIndex, TradeIndex,… are all referring to that TF. All other TF’s used in your strategy MUST be multiple of the main one!

    To recap, you have to launch your strategy from a 1-minute chart (the default or main TF as I already said). In your strategy you can use any additional TF provided it is a multiple of that main one!

    In your case you launched your strategy from a DAILY chart, but 1 minute is NOT a multiple of a DAY (it’s the other way round). From a daily chart you can launch a strategy that uses Daily, Weekly or Monthly TF!

    You will have to launch your strategy from a 1-minute chart (and you will have much less data history available!).

     

    2 users thanked author for this post.
    #88831

    Alright, this information helped me so much in understanding how TF works!
    I am so glad that this forum exists and that there are kind people helping others out, thank you so much!

    Best

    SimpaG

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

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