Partially close positions

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #16723 quote
    JohanJohan
    Participant
    Average
    I’m building a strategy that closes half of all positions once reach 50% of profit target. It works great while backtesting it but i’ll get a warning and can’t activate it. Error: “Trading systems with orders that partially close a position cannot be sent to ProOrder. make sure no quantity is specified in instructions to close positions (in this case the instruction closes all the entire position.)”   My code:
    if longonmarket then
    if (close > tradePrice) then
    sell (mylot / 2) contract at (tradePrice + ((targetprofit / 2) * pipsize)) limit
    endif
    endif
    
    set target pprofit targetprofit
    #16742 quote
    ElsborgtradingElsborgtrading
    Participant
    Veteran
    Hi Johan. PRT V.10.2 does not allow partially closing of position. we need wait until PRT v.10.3 Cheer Kasper
    #16863 quote
    JohanJohan
    Participant
    Average

    Thanks Kasper. I’ve been in touch with IG and they thought 10.3 will be available sometime early 2017. Let’s hope so!

    #34873 quote
    neffets89neffets89
    Participant
    New
    Hi Johan, I am very interested in such kind of strategy. Are there any new so far? Thanks Steffen
    #34883 quote
    ElsborgtradingElsborgtrading
    Participant
    Veteran
    No still not available- I suggest to make 2 Proorder of the same strategy- one with a fixed TP and one that breaks even with the fixed TP and initiate a trailing stop.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Partially close positions


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Johan @johan_holmberg Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by ElsborgtradingElsborgtrading
9 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/17/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...