Coding an entry for when PRT bands turn from red to green?

Forums ProRealTime English forum ProOrder support Coding an entry for when PRT bands turn from red to green?

Viewing 9 posts - 1 through 9 (of 9 total)
  • #170461

    Hi! I’ve been trying to use PRT bands in my trading systems but have a problem with coding an entry for when the bands switches from red to green. The start of every green period is obviously when price closes above the upper band, however this occurs many times during a green period as well. I would lika a signal that only activates when it turns from red to green. Can I somehow use the color itself and if the indicator returns green or red? But how should I code that?

    #170476

    I don’t normally use PRT bands so someone more familiar with them may know a better way of doing this, but it looks like a change of the medium-term line mostly leads to a change in the colour zone, which means you could try this:

    1 user thanked author for this post.
    #170478

    Thank you for your answer. I’ve scrolled through the graf and it seems that when PRTBANDMEDIUMTERM = PRTBANDSDOWN a color change is prompted from red to green. Could this relationship be the “secret” behind all the red to green switches?

    #170485

    That seems to be the case rising, but not falling.

    On 1 hour DAX, the medium line turned down at 1900 yesterday but it was nowhere near the upper or lower lines. At 20:00 the colour zone turned red.

    Similarly May 18 14:00

    In any case, I doubt if you could use this on it’s own as an entry condition as it’s very laggy – perhaps in conjunction with some other indicator.

    #170535

    had another look at this, the band changes colour when the candle closes above or below the upper/lower line. so the code would be:

    #170550

    Yes, that is true. When changing from green to red that is the only condition needed.

    Another issue would be to identify when price is in a “green trend”. For example that a trade can only be made if the overall trend is in “green”. We have identified how to code the switch between trends but how do we determine that the price is in the right trend; green or red?

    #170594

    Hi Moose

    Sorry but I didnt manage to insert link, so I just write it below 🙂 If I understand your question correct I would have done the below:

    if close>PRTBANDSUP then
    Greentrend=1
    endif
    if close<PRTBANDSDOWN then
    Greentrend=0
    endif

    And then use greentrend as one of the rules rule for order. The opposite code ofcourse for “redtrend”. Hope that helps.

     

    1 user thanked author for this post.
    #170600

    Hej PastaPesto!

    Yes, thank you. That is a very good solution to use 1 or 0 as the on and off switch for trends 🙂 Perfect.

    #170653

    Hi @Moose
    I think this is a very intresting idea.
    If u come up with a code i would be intressted to test it

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

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