set big line values automatically

Forums ProRealTime English forum ProOrder support set big line values automatically

  • This topic has 14 replies, 4 voices, and was last updated 4 years ago by avatarPaul.
Viewing 15 posts - 1 through 15 (of 15 total)
  • #54507

    Hi, 

    I’am trying a strategy based on the close which crosses a big lines.

    This is for the dax, but how can you calculate these big line numbers automatically and quickly, so the strategy is use-full for other markets without too much hassle? I thought about using the interval values, but it becomes messy quick. Is there a better way?

    Thanks in advance.

     

    #54516

    Hi Paul,  The levels can be created using the mod operator, see the code example below.  You might want to add some loops to store the level values. 

     

    1 user thanked author for this post.
    #54579

    Here’s the adjusted code. The results do not match the pic. Can you see something obvious wrong ?

     

     

    #54585

    Hi Paul, the difference is that the fixed lines are created once and the dynamic way of doing it is creating the levels on each 5 minute bar.  By creating the levels once a day e.g. if time = 080000 (any time before your start time) you will get the same result as per the previous version, actually better due to the Dhigh() and Dlow() checks you added.

    #54597

    Thanks for your response!

    To check if lines were correct I created a indicator. So lines are dynamic, based on a yesterday’s high.

    The index is never out of the *dynamic range*, so I thought it should be the same as fixed lines, but it isn’t.

    I will try new approach.

     

    #54633

    You could try to make the “CurrentPrice”, the last Close and see what happens:

    Since the code is read only once per bar, the round levels should be always calculated with the  Close of the current 5 minutes bar.

    #54730

    I tried your idea Nicolas. It didn’t work. Because when lines zigzag around a big line, the lines could move 1 bar. I think as a result the condition crossed was not met. Also tried the idea from AutoStrategist. But somehow it made the strategy 100x slower. But I found the cause. Somehow I overlooked I specified before only 1 part of the criteria for a big line.  But a line needs 2 criteria.

    Thanks for the tips!

    #54731

    Here’s the complete strategy.

    #54735

    Thank you Paul! Should be in the Library too! Do you want to post it there?

    FYI I posted a new indicator to spot these round levels recently: https://www.prorealcode.com/prorealtime-indicators/sweet-spots-numbers/

     

    #54822

    Very strange: When I’m not connected, I see that there are attachment in some of thes posts but when I’m logged, I can’t see attachments.

    And that is not the case in other disscusions.

    Am I the only one who have thi problem?

    #54826

    @Noisette

    Are you talking about this topic only? Or in any other topic of the forums? Because there are no attachments at all in this specific thread.

    When not connected, you are browsing cached pages which may be “old” (one hour or so..), so that’s possible that you might spot some differences if you are logged or not. 

    #54831

    @Nicolas: I saw this problem only in some threads.

    I’m sure that there were attachments in some of the posts above. For example about 1 hour ago, in #53731 there were a picture and an itf file to download that disappeared when I logged in.

    And now no attachment (log in or log out)

    Thanks.

    #54850

    I understand now why these files have been deleted, while Paul send a new post in the library, he deleted its own old files.. No worry the strategy will be available in the code library today after a short review.

    EDIT: the strategy is now available in the library: big line strategy for DAX

    #54940

    Ok. That’s clear Nicolas.

    So thank you Paul for your code. In my opinion Dax and Nasdaq Should be the most suitable for this strategy.

    I’ll try some modifications and tests and wiĺl share if it improve performance. 

     

     

     

     

     

    1 user thanked author for this post.
    #105751

    Checking out this old system. Updated a bit. Try use factor 50 or 100. It needs an extra filter, but current run is nice. On DAX30, TF 5min

     

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

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