SET STOP PTRAILING not closing the entire position

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

    Hi,

    I am finding that SET STOP PTRAILING is only closing the last trade, not the entire position. Please see the attached screenshot. The position has four trades, and only the last trade is closed.

    The only exit in my code is the SET STOP PTRAILING. I’m probably misunderstanding something, and would be grateful for any pointers.

    Tim.

    Picture1.png Picture1.png
    #235896 quote
    TimHTimH
    Participant
    New

    I’ve uploaded a clear screenshot.

    trailing.jpg trailing.jpg
    #235898 quote
    JSJS
    Participant
    Master

    Do you have the parameter below set to “True”…?

    DefParam CumulateOrders=True

    #235913 quote
    Iván GonzálezIván González
    Moderator
    Legend
    Maybe you can share your code to check what’s going on
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

SET STOP PTRAILING not closing the entire position


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
TimH @timh Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Iván GonzálezIván González
2 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/29/2024
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...