Exitshort 1 contract

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #227426 quote
    killerplatuzekillerplatuze
    Participant
    New

    The strategy sells 2 contracts at market, one of them should be go out with Target Profit, the second one goes out with another parameters.

    How can i sell the first one? Set Target profit xx dont works in this case, it will close both contracts.

    #227427 quote
    PeterStPeterSt
    Participant
    Master

    The answer is in your Title of the topic. It is actually like that. 🙂
    Of course you must do it in code and track yourself when to exit that 1 (or any number) of contracts.

    ashehzi thanked this post
    #227430 quote
    killerplatuzekillerplatuze
    Participant
    New

    How can i set Target Profit for one contract if i have two contracts? Thats the question.

    #227432 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Firstly set the TP to the max TP you want to gain.

    Secondly, check when the intermediate TP is reached, at the closing of each bar (pending orders cannot partially close positions) and close the desired size AT MARKET.

    killerplatuze thanked this post
Viewing 4 posts - 1 through 4 (of 4 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

Exitshort 1 contract


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by robertogozzirobertogozzi
2 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/05/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...