Round Numbers – Wildcard Character

Forums ProRealTime English forum ProOrder support Round Numbers – Wildcard Character

Viewing 5 posts - 1 through 5 (of 5 total)
  • #4877

    Firstly, thanks for creating the ProRealCode website, it’s going to be a great resource.

    I’d like to make strategies aware of key levels where the market will have support/resistance

    For example…

    If price (OHLC) is within X points of XX,000/XX,050 etc.. then don’t trade/set stop to minimum level etc..

    Is there anyway to use wildcard characters in PRT?

    Regards

    Steve

    #4908

    Minmax, why would you need a wildcard, could you please elaborate on your example?

    .

    #4909

    Hi Jerry, It’s a support and resistance level, any strategy needs to take it into account, having a wildcard character would save me adding every number ending in 000 or 050 from 0 to 20,000 into my support and resistance indicator

    For example..

    if price(ohlc) is within 10 pips of 17,000 or 18,000 or 19,000, or 20,000 or 21,000 etc… (and every number in between) then set stop loss 10

    Would become: if price(ohlc) is within 10 pips of a number ending XX,000 or XX,100, XX,050 then set stop loss to 10

    I was thinking there must be a mathematical formula to achieve the same thing, any ideas?

    Regards

    Steve

    #95397

    Hi MinMax,

    Use the MOD function.

    eg.

     

    Explanation: The MOD function returns the remainder from a division. So if you want to check to see if the CLOSE ends with 00 or 50, it will return 0 when the division is carried out.

    CLOSE = 1234,  1234 MOD 50 = 34

    CLOSE = 1250,  1250 MOD 50 = 0

    CLOSE = 1300,  1300 MOD 50 = 0

     

    2 users thanked author for this post.
    #95405

    theoldhopbarn – welcome to the forums and thank you for providing minmax with a solution. He is very patient as he has waited 33 months for it!

    Could you please use the ‘Insert PRT Code’ button when putting code in your future post as it makes it so much easier for others to read. I have tidied up your post for you. 🙂

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

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