Need help with arrays to count highs and lows with conditions

Forums ProRealTime English forum ProBuilder support Need help with arrays to count highs and lows with conditions

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • #153777

    Im not sure if its correct to make a request for help here or to use niclas’ thread so please move my post if you feel like it mods.

    Im fairly new with PRT v11 arrays and im trying to wrap my head around it. Would love to get some help.
    I wanna start with something fairly simple. Please look at attached screenshot for details.

    So for starters i want to do 2 things:

    1. Count as explained in the photo. Count the amount of highs and count the amount of lows, seperatly.
    2. I want to be able to use the price of the different levels. Lets for example say that my system demands a count higher than 3, and i want to buy if low closes under point 2.

    And im not begging for the code here, a walkthrough on how to do it would be amazing, so i dont have to bother you guys forever 🙂 Teach a man to fish etc!

     

    Edit: btw the photo is daily candles on amazon in end of July month 2020

    Edit2: If im wrong about the numbers in the index its because i dont quite understand it yet! Or i might have botched a copy paste 🙂 in other words, i might be wrong

     

    #153795

    Firstly, are you able to code the conditions you describe to detect the counts? (before using arrays to store them).

    #154496

    i assume i would need to start with

    This would be the trigger to start the count. As long as there is no higher high then that point then the count continues. I would also need to stop the count if it breaks to the downside. I think that point would have to be low crosses under lowest[period2] from the highest high point.

    After that i would code in the lower low/higher highs

     

    #154498

    I ment to say in the pictures last text: “New highest high, count is now reset”

    #154808

    Maybe this will help with showing what level of understanding im at..

     

    #154867

    You don’t really need to use arrays if you just want to record the last highest high and last lowest low and perhaps the ones before that. Think of arrays as a big filing cabinet that you can store lots of information in to later search through easily. If you only have a couple of bits of paper to store then you don’t need to use a filing cabinet – a couple of envelopes will do.

    #154873

    yea i get that Vonasi, im just trying to understand this using a practical example that i can do.. i guess i picked a bad example tho. Im not sure how the lastset stuff and looping work.

    #157665

    Some of the best most useful threads in PRC are the ones with tumbleweeds imo  . Post an uber optomised no logic curve and the crowd flocks in .  Never ceases to amaze me  .

     

    Profit is onto something with his ” count ” imo   .  Add some volatility filter  and  couple more simple parameters and you got a ” thing ”

     

    rock on  and yeah its cryptic

Viewing 8 posts - 1 through 8 (of 8 total)

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