Auto Trading Help

Forums ProRealTime English forum ProOrder support Auto Trading Help

Viewing 7 posts - 1 through 7 (of 7 total)
  • #175266

    Hi All

    I am pretty new in coding. is it possible to automate trading with rules below? Also how much ProREaltime will charge for Auto Order?

    Buy 80 Contract at market

    Set Trailing Stop loss = Distance 25, Step = 20

    If Market Price – Entry Price =20 then  Close 40

    If Market Price – Entry = 30 then Close 20

    If Market Price – Entry = 40 then  Close 10

    If time = 2:00 pm or Entry time + 4 Hrs and nothing triggered

    Then

    if Market Price > Entry Price  then close 40 and Stop = Entry

    If Entry Price – Market Price > 15 then Close 40 and limit = Entry +10

    If Entry Price -Market Price  <15 then Stop = 16 and limit = Entry +5

    Notes: As IG will withhold margin for any order all the Close orders should be in limit format not a new order. Also Is it possible to set the order type as Force Open instead of Net postion?

     

    Thanks

    A

    #175272

    Fees and spread are not known automatically.

    What do you mean by “and limit = Entry +10“ (or 5)?

    What do you mean by “As IG will withhold margin for any order all the Close orders should be in limit format not a new order”?

     

    #175275

    Hi Roberto

    PLease see below:

     

    What do you mean by “and limit = Entry +10“ (or 5)?

     

    I know limit is confusing here in other platform limit is the price that you want to enter the market but in IG limit is somehow equal to target/take profit.

    In IG platform when you create an order there are three fields, Price level = price you want to open postion, Stop= Stop, Limit =  take profit/Target .

     

    What do you mean by “As IG will withhold margin for any order all the Close orders should be in limit format not a new order”?

     

    This is what I am doing manually now: I buy at market 80 contract, and at same time I create 3 sell orders of 40 contract at price level of Entry +20 , 20 contract at Entry +30 and 10 Contract at Entry +40. So when I do this in the platform IG will withhold Margin for all of my orders that means with this strategy I would need margin for at least 160 contract.So if I dont want to use my margin on the sell orders, I have to monitor the charts 24/7 and wait until it meets my criteria and go to the position and partially close the contracts that I want. Other workaround is instead of buying 80 contracts I open 4 different positons at the same time with different limits( targets)

    What I am looking for in PRT  is to be able to automate this . In the rules when I say “If Market Price – Entry = 40 then  Close 10” I dont want the PRT create a new order that use my margin but just partially close 10 contracts (like I am doing it manually) when it reaches to +40.

     

    Hope it is clear now.

    Thanks

     

    #175285

    There’s no need for a FORCE OPEN instruction, as opening opposite positions is not allowed in a single strategy (multipole different strategies can, provided you have set Force Open with IG).

    There you go (I tested it on DAX, 1h TF):

     

    1 user thanked author for this post.
    #175334

    Backtest 3 years

    #175338

    Thanks for reply , I can see that there is an entry condition. I would like to manually enter the market with no condition when I press start  the autotrade. So basically I am more interested in closing the positions with Autotrade not openning the positons.

    #175341

    Remove line 18 and replace line 19 with this one:

    It will then enter again as soon as the trade is closed.

     

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

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