Monday = INTRADAYBARINDEX : 11 ?

Forums ProRealTime English forum ProOrder support Monday = INTRADAYBARINDEX : 11 ?

Viewing 7 posts - 16 through 22 (of 22 total)
  • #214429

    @robertogozzi

    Perfect 😊, I’ve been racking my brain for another 40 minutes to understand your explanation and that of @JC_Bywan

     

    @All

    I thank you very much for your answers and your help,

    I finally realized my mistake, which was simply that I was not resetting my variable, I was torturing my head to make it true but it was never reset to false

     

    I enclose a small diagram that could help other readers before throwing it away

     

     

    #214499

    hi everyone,

    that is now my day of week period for my math :

    I find myself with a new problem, I will try to think about it and especially to formulate the question well 😊

    #214508

     

    1 user thanked author for this post.
    #214559

    that is my new code :


    @PeterSt

    Thank you very much for your answer, I tested your code but it does not work as I want, I explain :
    my Monday period starts on Monday at 08:05 and ends on Tuesday at 08:00

    with your method that we will call solution B, the condition is false between the bar index 0 of Tuesday until Tuesday 8:00 am

    Solution A (Mine) :

    Solution B (PeterSt) :

    #214564

    with your method that we will call solution B, the condition is false between the bar index 0 of Tuesday until Tuesday 8:00 am

    I understand. But I had to guess that your Instrument would open at 08:00 – e.g. almost all Eurex.

    So what you say is that e.g. on Monday at 07:55 you still want to use Friday as MyxxxxPeriod ?

    Anyway, I thought to rewrite your code a little shorter and with less redundancy. If that functionally can’t work (I understand that now) then apologies for the noise.

    #214607

    I understand. But I had to guess that your Instrument would open at 08:00 – e.g. almost all Eurex.

    Yes, you’re right, the goal is to learn and master the programming, I also say to myself that Forex is a 24 hour market and that it is traded mostly by robots like all markets, so start at 8am or just after or just before, I think we understand each other

    So what you say is that e.g. on Monday at 07:55 you still want to use Friday as MyxxxxPeriod ?

    As far as the period from Friday to Monday 8am is concerned it doesn’t make sense, but as I take trades due every day from 8am onwards I would like to know how much I lost the day before, hence the calculation of this period in case on Friday I don’t cut all or part of my position and there are leftovers

    Anyway, I thought to rewrite your code a little shorter and with less redundancy. If that functionally can’t work (I understand that now) then apologies for the noise.

    you have thought and you have done very well to answer me, any answer or remark or criticism is more than welcome 😃

    #214677

    @PeterSt

    You did well to ask the question, I noticed that there was an overlap and that the values were not reset at the right time between Friday and Monday 😊

Viewing 7 posts - 16 through 22 (of 22 total)

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