Exit after (n) days

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #69664 quote
    ronkar
    Participant
    Average

    How can I write the code to exit (sell) after a certain period of time, from start (buy) of position? Days or hours.

    Thanks!

    BR

    Ronny

    #69666 quote
    Inertia
    Participant
    Master
    x  = 20
    
    IF BarIndex - TradeIndex = x Then
    Sell at Market
    endif

    Hi,

    There you go 😉

    Nicolas, von and Bel thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Exit after (n) days


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
ronkar @ronkar Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Inertia
7 years, 10 months ago.

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