close position after n bar.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33638 quote
    Francesco78
    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
    Nicolas
    Keymaster
    Master

    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
    Francesco78
    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.

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 Francesco78
8 years, 10 months ago.

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