code for one tick time frame to another

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31257 quote
    robert123
    Participant
    Master

    Dear Nicolas,

     

    Although it seems that this not possible to do, I think that I may have found a way round it, but need your help to streamline the code.

    I have managed to get this  working reasonably well, is there any way that a loop can be created ?

     

    I hope the below makes a modicum of sense.

    TIA

    Robert

     

    bi= intradaybarindex
    i=11  (39/416)………the tick ratio

    if bi=i then

    b=b1[11]…………..the indicator being called from a higher tick timeframe

    endif
    if bi=(i*2) then
    b=b1[11]
    endif

    if bi=(i*3) then
    b=b1[11]
    endif

    if bi=(i*5) then
    b=b1[11]
    endif

    etc…etc…probably need a day’s worth of data points.

    #31389 quote
    Nicolas
    Keymaster
    Master

    Hi Robert, I’m sorry but what is the full purpose of your code and your question? Thank you.

    #31434 quote
    robert123
    Participant
    Master

    Hi Nicolas,

     

    The idea is to try and get an indicator from the 416 tick chart into the 39 tick chart . Although I know that this is not really possible at the moment, I still want to try!!

    I have an indicator that works well in both time frames but wanted to see them  both at work in the smaller.

    The idea is to call the info for every 11 ticks on the 39, which be roughly 1 tick on the 416.

    I need your help to streamline the code, is there anyway that a loop can be created that would count units of 11 (i.e the 39/416 ratio)?

    As at the moment I am having to do it the long way round…see above.

    I would be grateful if you could shed any light on this.

    Many thanks,

    Robert

    #31557 quote
    Elsborgtrading
    Participant
    Veteran

    Just my 2 cents on real life experiance and info. Excetuting any code  below 1 min TF becomes unstable when placing orders. PRT cannot follow the status of the orders and it will stop the code.

    I have raised question here

    Cheers Kasper

    #31626 quote
    Nicolas
    Keymaster
    Master

    If I understood correctly, you could just increment a factor each time you call your “higher timeframe” value and also put it in your conditional statement, like this:

    //define first time factor 
    once factor=1
    
    if bi=(i*factor) then 
     b=b1[11] 
     factor=factor+1
    endif

    Hope I’m on the right track! 🙂

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

code for one tick time frame to another


ProBuilder support

New Reply
Author
author-avatar
robert123 @robert123 Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by Nicolas
8 years, 9 months ago.

Topic Details
Forum: ProBuilder support
Language: English
Started: 04/06/2017
Status: Active
Attachments: No files
Logo Logo
Loading...