Buy order not executed in v10.3?

Forums ProRealTime English forum ProOrder support Buy order not executed in v10.3?

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

    Hi everyone,

    I am new to PRT.  Can anyone please help me.  I would like to execute buy or sell orders based on my target price variable.  Unfortunately, I cannot get the below code in PRT 10.3 via IG Index UK to work.

    Ideally, I would like to achieve the following:-

    • Execute two orders, if the current price is ± of myPrice.  So between 10533 and 10553 say.
    • Set one order limit to 10 points/pips
    • Once the first order hits the 10 point/pip limit, the second order stop loss is set to break even.  The idea is to then swing trade the second order.  Is this possible to achieve in ProOrder?
    • Is it possible to manage two orders placed manually with ProOrder to acieve the above?

    Many thanks in advance.

     

    #27893

    Hi Nate

    At first glance the code looks like it should work to me, but you sure you don’t want

    which is 20 units, but I’ve forgotten what a Unit is??:) (Its late!)
    A Unit may be $1 if you are trading in dollars, not sure.
    Cheers
    GraHal

    #27894

    Does below work? Just an idea. Need sleep now 🙂

     

    #28083

    Hi Nate,

    Bit pushed for time atm but you might get some ideas from this link..

    This was programmed using 10.2 and I’m not really up to speed with 10.3 ..( mind you, I wasn’t with 10.2 either LoL !)

    https://www.prorealcode.com/blog/learning/breakeven-code-automated-trading-strategy/

    Also I was thinking you could split them into two different codes – one to take 10 Point and another to bring Stops to b/e.

    Hope this helps a little…

    #28085

    @Big Hug  hahaha keep the humour coming  … we need it to make the day go round!! 😉

    @Nate  now I’ve slept, Stop Loss and TP are usually the last 2 lines of code (outside of an IF statement, unless you have different SL & TP for Longs or Shorts) … does that make it work?

     

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