MTF – Multi Time Frame Coding – No Trades Executed – Weekly, Daily, 1hr

Forums ProRealTime English forum ProOrder support MTF – Multi Time Frame Coding – No Trades Executed – Weekly, Daily, 1hr

Currently, there are 0 users and 1 guest visiting this topic.
View all attachments
Viewing 4 posts - 1 through 4 (of 4 total)
  • #157897 Report

    Hi All,

    I am new to the site and new to coding with PRT. I have coded a MTF momentum pull back strategy which shows no errors

    when i code it in PRT but when i backtest it, the strategy executes no trades at all. I think something may be wrong with

    the syntax or structure of my MTF coding, hoping someone can give me some guidance.

    Also if you have any suggestions to improve this code or strategy , please let me know.

    Here is a summary of the strategy and code:

    1. Weekly Time Frame – Price above 5MA + Price Higher Than Last 4 Bars + MACD>0  (Stock Rising on weekly time frame)

    2. Daily Time Frame – Price above 5MA + Price Higher Than Last 4 Bars + MACD>0 (Stock Rising on daily time frame)

    3. Hourly Time Frame – MACD <0 + MACD Higher Than Last 4 Bars (Trade should execute on 1hr time frame. Buy on rising but negative MACD (dips))

    4. Trade Execution – Execute trade on the 1 hour chart if weekly and daily conditions  are met. If weekly and daily condition are not met, do not trade.

    #mtf #multitimeframe #multi time frame

    #157898 Report

    I would move all conditions to the default TF.

    I would call the default TF just DEFAULT without 1h, so you can run it from another TF, just in case.

    I would remove line 32.


    #158360 Report

    Thanks for taking a look Roberto and for the structure updates around the code, unfortunately, it still doesn’t work, backtest just shows   “No Data”. No trades are executed.

    Strangely, there are no errors anywhere that i can see, my original code also returned no errors. I have tried on different time frames and different stocks and the same thing.

    I have provided a screen shot of what i see as an example.



    #158383 Report

    To add to this, i have just noticed something strange.

    If i create a MTF scanner with the assisted mode, PRT creates the correct code with the different timeframe parameters and the scanner works.

    If i then try the same thing with the backtest / auto trading, PRT DOES NOT not create any code at all related to the different timeframes. There are no timeframe references.

    This suggests that MTF is available and works on the scanner but not on backtesting / autotrading.

    I am doing all this in my IG PRT Demo Account, v11.1 of PRT being used, if that makes any difference.

    Anyone seen anything like this ?  I will test my real account later.

    Screenshots attached.

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