close position after n bar.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33638 quote
    Francesco78Francesco78
    Participant
    Master

    Hi everyone,

    Quick and naive question: what is the instruction in order to  close position after n bars from the opening of the position?

    Many thanks

    Francesco

    #33656 quote
    NicolasNicolas
    Keymaster
    Legend

    This is the first URL that come from a quick search with the search tool of the website: https://www.prorealcode.com/topic/general-question/

    Sorry, but it has been answered soooo many times already 🙂 You’ll find a lot of code snippet for this in many different forum topics.

    Despite of this fact, you can find the barindex from when your last Y order has opened at market with TRADEINDEX

    #33662 quote
    Francesco78Francesco78
    Participant
    Master

    Thank you Nicolas, sorry again for the naive question. This website is a jewel!

Viewing 3 posts - 1 through 3 (of 3 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

close position after n bar.


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Francesco78Francesco78
9 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/27/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...