Buy 2 shares and sell one with a little profit and one when indicators change

Forums ProRealTime English forum ProOrder support Buy 2 shares and sell one with a little profit and one when indicators change

Viewing 11 posts - 1 through 11 (of 11 total)
  • #5727

    Hi,

    If I would want to:

    Buy 2 shares and sell one with a little profit and one when indicators change, how can I code that?

    Maybe something like this?:

     

    This is an attempt to compensate for a not trending market, with a trend following system.

    Thanks!

    #5728

    Maybe I can use:

    ?
    But if I want to define the profit in points?

    #5735

    Hi simon, unfortunaly it is not possible to do partial close of the positions.

    About STRATEGYPROFIT, it defines the profit in money but for closed trades, not them actually on market.

    If you want to define the profit in points, you can make a loop through all the orders and make an addition of the whole actual profit:

    for short position example

     

    #5763

    Thanks!

    #8313

    Hi!
    How comes it’s not possible in PRT to partially close your position?
    Many of my “manual” strategies use this, so it’s a bummer if it will never get implemented in ProOrder.

    Do you have any information if it might be possible in the future?

    Cheers!

    #8315

    It’s due to broker convention limitations actually. This is a must have you are right.  I don’t know when it will be available sorry.

    #8317

    Hello

    to solve this problem the only Way I found is to run two times the same algorithme with two different take profit …

    #8359

    Hi there,

    Same problem here,  my strategy also employs partially closing of positions. I’ve tried to solve this by using a proprietary code for the stop loss and target profit  without using the build-in commands “set stop loss” and set target profit”. But this only solves the problem partially since my timeframe of preference is the 1H, the positions don’t get closed at the preprogrammed  desired levels due to the fact PRT doesn’t close the position until the nextbar open, so if this level differs a lot from the desired closing level then there will be a discrepancy between real trading and backtesting. This discrepancy becomes much smaller when trading the smaller timeframes.

    Regards,

    #12637

    This is unfortunate wanted to forward test a strategy in my demo IG account and then suddenly realised that I could not because  my strategy partially closes positions. I find especially with short positions on the SA TOP 40 index  to take profits helps a lot in making short trades profitable.

    #12700

    Nicolas I thought this partial close (x units) objective could be achieved with the floatingprofit code?

    #12709

    Partial close of positions is only possible in paper trading. When you SELL or EXHITSHORT, every positions on market will be closed. I heard it would be possible in the future with the new IG API, but it’s only a “rumor” for now..

    2 users thanked author for this post.
Viewing 11 posts - 1 through 11 (of 11 total)

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