Problem with tp and sl on multipositions.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #174141 quote
    Link
    Participant
    Senior
    How to handle tp and sl with 2 long positions.
    
    In the first position the tp is 2.1 and the sl 1.6.
    
    If the price falls 0.8 a second long position enters.
    
    Then the tp of the second position would be 2.9 and the sl 0.8.
    And the tp of the first position would remain at 2.1 and sl 1.6.
    
    I can't get it to work like that.
    
    Ideas?
    #174146 quote
    robertogozzi
    Moderator
    Master

    Please post your text in plain text.

    You have been reminded the basic rules so many times!

    If you want to be helped, respect all the other people in this community.

    The ‘Insert PRT Code’ button is to be used with code only.

    Thank you 🙂

    #174197 quote
    TempusFugit
    Participant
    Veteran

    Have you tried to use “manual stop/profit” instead of the standard, I mean something like this for the tp of the second entry:

    IF CLOSE-TRADEPRICE>2.9*CLOSE/100 THEN
    SELL X CONTRACT AT MARKET//ONLY THE POSITION OF THE SECOND ENTRY
    ENDIF

    And the same for all the stops/profits

    Another possibility that can work is to make two different systems, one for each of the entrys with its own sl/tp

    Buena caza!

    #174198 quote
    TempusFugit
    Participant
    Veteran

    Take in consideration that the  “manual sl/tp” will be executed at the close of the bar not at any moment as the standard stop

    For working as the standard you could use stop orders also, but that will complicate it more

    #174216 quote
    Link
    Participant
    Senior

    Thanks Tempus…

     

    I see.

    #174218 quote
    robertogozzi
    Moderator
    Master

    SL and TP cannot be individually kept.

    At any new position added (or closed), POSITIONPRICE (an average of the several entry prices) is updated and SL & TP as well.

    See the attached pic to know how the average is calculated (it’s the entry price multiplied by the number of lots).

    Calcolo-del-Prezzo-Medio-di-una-Posizione-Position-Average-Price-calculation-2.jpg Calcolo-del-Prezzo-Medio-di-una-Posizione-Position-Average-Price-calculation-2.jpg
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Problem with tp and sl on multipositions.


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Link @tony-manero Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by robertogozzi
4 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/25/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...