Pro builder language buy and sell orders

Forums ProRealTime English forum ProOrder support Pro builder language buy and sell orders

Viewing 4 posts - 1 through 4 (of 4 total)
  • #5287

    Hello all,

    I’m completely new to work with automatic trading robots such as prorealtime, it looks great and I see a lot off opportunities. Now I need some help, to translate a part of my trading strategy to pro builder language. Hopefully will someone help me with this, now lets start with an example,

    I buy 2 contracts at the market (DAX) when this meet some indicator criteria, lets say 9600 for a long position. This is very clear for me to program, but when the market goes down I will buy 1 contract at 9595 (minus 5 points from the first position), buy 1 contract at 9585 (minus 10 points from the second position), buy 1 contract at 9565 (minus 20 points from the third position). If one of these orders is execute, I will sell the position with 5 points profit, for example 9595 executed and sell it at 9600. If it goes more down, I buy 1 contract at 9525 (minus 40 points from the last position), 9475, 9435 and so on. If one of these orders is execute, I will sell the position with 10 points profit, for example 9525 executed and sell it at 9535, and so on. This orders need to execute till my profit target for this strategy is reached from all open positions together.

     

    Many thanks in advance!

     

    #5292

    Hello,

    What you want to be coded here is a typical averaging down orders grid, isn’t it?

    If so I remember have coded something similar as an example in the prorealtime documentation here.

    Here is the code though :

     

    Of course you’ll have to adapt the code a bit for your dynamic grid space between orders. But that’s a good start to learn more of the possibilites of ProOrder trading module.

    #5295

    Hello Nicolas,

    First of all, thanks for the very quick response!

    It’s a kind of averaging down orders, yes. But I want to sell my executed orders (positions), if they reached my targets (5 points or 10 points), for example when the market goes straight down to 9565 and then up to 9590 and then down to 9580. In this example, I need to buy at 9595, 9585 and 9565 then sell at 9570 and 9590 and then buy again at 9585. So, wen the market goes sideways between 9565 and 9590, I can make small profits so that I reach my strategy profit target sooner.

    #5298

    Ok, so you want to partially close the orders basket. Be aware that trades made with ProRealTime are position centric and the whole orders become a global one, so there are limitations while playing with a bunch of orders conditions at the same time 🙂

    It’s not so difficult to achieve but very time consuming. I can help you code the strategy but you’ll have to put some work on too.

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

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