MA cross, buy trigger

Forums ProRealTime English forum ProOrder support MA cross, buy trigger

Viewing 10 posts - 1 through 10 (of 10 total)
  • #5053

    Salut,

    Say I have an MA plotted on the price chart, and the price is currently sitting under the MA.

    I want to buy when the MA is touched, but I don’t want to buy at next open… I want to buy at the price of the MA on that same bar.  Is this possible to code please?

    Many thanks.

    #5060

    Hi, not exactly because the system always wait until the current bar is finished to open a new position.

    But you can still open a position in the next candle at the same price where the last bar was touched with a LIMIT order.

    Hope it helps you.

     

    #5071

    Hello, if the price is “currently sitting under the MA”, the pending order would be a STOP one and not a LIMIT one, or I miss something here.. sorry got a cold.. 😐

    Thank you very much Adolfo for helping people around here!!!

    #5078

    I’m glad if can help even one person.
    Nicolas, I mean, in my example we are buying when the price comes to touch MA after a long movement, we go with the trend after a pullback.

     

    Greetings!

    #5079

    Adolfo, PRT finds an error on this line.  Unfortunately I’m very new to coding this platform…

    IF NOT LongOnMarket AND BUY=1  THEN

    Thank you.

    PS price is touches on a price above the current price, so yes Nicolas that’s right, probably a STOP order.

    #5080

    Maybe you are not using “BUY=1”. So I should be wrong.

    You want to BUY when the price CROSSES UNDER MA? When the price is rising and touch MA you want to buy, right?

    Can you give more details please?

     

     

    #5083

    I want to buy when the price rises to touch the MA (which lies above it), with an entry price == MA on the same day.

    Thank you. 🙂

    #5084

    Then should be something like this, but it will always buy when it occours.

    Let me know if works for you!

     

    #5088

    Thank you, it appears to work fine.  I just have to go through the trade list and check.

    🙂

    #13937

    This is something similar to what I need, Where do I put this in my current code?

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

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