Close trade based on duration (# units)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #233355 quote
    AleraAlera
    Participant
    New

    Does Proreal Time Auto trader have functionality to close a trade based on #units since trade opened?

    #233356 quote
    JSJS
    Participant
    Master

    That is certainly possible, for example you can use:

    BarIndex-TradeIndex(1)>= #Units

    Example:

    If OnMarket and BarIndex-TradeIndex(1)>=5 then

      Sell at Market

      ExitShort at Market

    EndIf

    Iván González thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

From idea to ProBuilder code in seconds.

Your coding copilot for ProRealTime™. Ask in plain English — get clean, ready-to-paste indicators, screeners and systems.

Available in 7 languages
Try ProRealAI

Close trade based on duration (# units)


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
Alera @alera Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by JSJS
2 years, 3 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 05/31/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...