MTF Sequential Setup

Forums ProRealTime English forum ProOrder support MTF Sequential Setup

Viewing 15 posts - 16 through 30 (of 49 total)
  • #106040
    VN

    Thank you Roberto!

    #106081
    VN

    Hi Roberto, I wanted to use the above MTF code (Timeframe function) to test this as an indicator first before making it into a ProOrder/Backtesting program to see how it works before asking the program to execute the buys & sells. When asking to add the indicator with the multiple conditions to the chart, the programme brings up the syntax error message ” The keyword TIMEFRAME is only used for  ProBacktest programming”.

    I would just like to test how the multiple conditions based on the behaviour of indicators which are evaluated at different TFs behave prior to making orders and this is to ensure my code does what it is supposed to.

    Do you know how one get around this issue?

    Thanks

    #106083

    TIMEFRAME is only allowed in ProOrder and ProScreener. If you want to test values then use GRAPH and GRAPHONPRICE in a strategy. If you don’t want it to trade then just use a dummy buy order that can never be met such as:

     

    #106098
    VN

    Thanks Vonasi,

    so I was able to do this, but the results the graph showed were not as expected. My code does similar to the above code from Robert in that the buy/sell condition must be true when an indicator (ROC in my case) is below zero and falling under (a) the current default display TF e.g. 1 min AND (b) is below zero and falling when evaluated on a 5 min TF. I also have a few other conditions which I only need to be evaluated at default TF, only this particular condition uses an indicator based on two different time frames. I don’t know if it matters in what order I do the condition testing so as not to affect all other conditions which only need default TF. My code in simple terms is this:

     

     

    #106101

    VN – Please always use the ‘Insert PRT Code’ button when putting code in your posts as it makes it so much easier for others to read. I have tidied up your post! 🙂

    #106102

    You have declared the indicators myRSI and myROC only in the default timeframe. You need to declare them in each time frame.

     

    #106130
    VN

    Thanks for this Vonasi,

    seems like this is working but not quite 100%. I was hoping the “myROC5[0] < myROC5[1]” part of the code to actually compare the ROC values off the 5 min interval. To illustrate with an example of what I mean; every minute all 3 conditions will be checked so if for example the check takes place at 11:17, then for condition1, I was hoping the code to look for the myROC variable from 11:15 (myROC5[0]) and 11:00 (myROC5[1]) since technically these are the nearest complete variables calculated on the 5 min interval that are closest to 11:17 (the latest myROC5 has another 3 min until it will be calculated). I tried changing the “updateonclose”  to “default” but that doesn’t quite work either. I can also see that the code isn’t quite doing what I need as I am directly comparing the 1 min chart on which I am running this test to a 5 min chart which shows the ROC values and at 11:17 the 11:15 and 11:10 values should be used by the code for evaluation but they are not.

    Does something need to be re-jigged with the code or is that how it is supposed to be?

    #106136

    It is very difficult to understand what you have written. I would suggest using GRAPH to show you the values of your four indicators to make it easier for you to understand what is happening.

    #106141
    VN

    Hey Vonasi, to be honest the code I am running is just what you helped me with above. I have just added the GRAPH myROC5 line at the end so that I can see how the myROC5 variable moves and I compare it to an ROC[14](close)  indicator which I run on a separate 5 min chart. When the above code runs my understanding is that the myROC5[0] < myROC5[1] part of condition1 (line 4 in your reply) should return the myROC5[0] and myROC5[1] calculated on the 5 min interval so in the example I gave, if the calculation of the SELLSHORT entry (line 12 in your reply) takes place every minute, say for example 11:17, then the myROC5[0] value returned should be that of 11:15 as that is the nearest completed candle on the 5 min timeframe line (line 4) and for the myROC5[1] should be the 11:10 candle value. The code above is not returning the 11:15 and 11:10 myROC5 values however.

    Does this makes sense? I do not know how else to describe it unless I have completely misunderstood what the timeframe feature does, but i think it should simply allow you to evaluate price movements at different resolution/time frames rather than using multiple different charts in my example here I am just running the ROC on a 1 min chart and then another on a 5 min, but when asking it to evaluate myROC5[0] < myROC5[1] it seems it doesnt compare the exact ROC values which the 5 min chart has computed.

     

    #106146

    Without spending a lot of time adding your code and all your indicators to a chart it is difficult to work out what you are saying. Why don’t you post a screenshot as you already have it all in front of you?

     

    #106150
    VN

    here are two screenshots in excel file with a brief description

    #106154

    Just attaching individual screen shots would be much easier than expecting others to download xlsx files and then open up Excel. Then even when I did download it the screenshots are incredibly cluttered with a million and one indicators so it is impossible to see what is actually relevant to what we are discussing. Could I politely suggest that if you want assistance then you try to make it as easy as possible for those trying to help rather than as difficult as possible! 🙂

    #106161
    VN

    OK Vonasi, without over complicating this query, let me put this to you in just 2 questions.

    Referring to line 4 above of the code you helped me with “condition1 = myROC5 < 0 AND myROC5[0] < myROC5[1] ” which falls under the “timeframe(5 minute, updateonclose) ” code.

    What should the “myROC5[0]” variable return from that part of the code? ” Will it be the latest ROC of the last 14 period 5 min candle closes? If “YES”, then given the 5 min candles are obviously calculated at every 5 mins interval (hh:00, hh:05, hh:10…. until hh:55), then what HH:MM close would you expect to see when the program checks this condition every 1 min (line 14), eg. when line 14 runs at say HH:17, then the  “myROC5[0]” will be as of what time?

    I appreciate your help  – I am just trying to understand the logic.

    #106162

    Just add the following dummy strategy to your default timeframe chart and hopefully all will become clear.

     

    #106165

    If you look at the attached image which shows just the 5 minute RSI with default (black) and updateonclose (red) on a 1 minute chart. At the close of the 2339 candle both are updated but at the close of the 2340 candle only the default one is updated. The updateonclose one will not funnily enough update until the 5 minute candle has closed – that is why it is called ‘updateonclose’! So it will next update its value at the close of the 2344 candle.

Viewing 15 posts - 16 through 30 (of 49 total)

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