Exit after (n) days

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #69664 quote
    ronkarronkar
    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
    InertiaInertia
    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.
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

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 InertiaInertia
8 years, 5 months ago.

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