Close a position after 3 hours

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #19573 quote
    StephanStephan
    Participant
    New

    Hi.

    I wanna try a strategy and i am looking for a code  that takes a position one for up and closes after say 3 hours no matter win or loss?

    #19608 quote
    GraHalGraHal
    Participant
    Legend

    Hi Stephan

    What are your conditions to enter Long or Short? Plenty of examples on here or in the PRT Auto-System Help Manual.

    Let’s say you are using the 5 Min Timeframe, then to close your Trade after 3 hours is …

    IF BarIndex - TradeIndex = 36 Then
    Sell at Market
    ExitShort ar Market
    EndIF

    Cheers
    GraHal

    Nicolas and Bard thanked this post
    #19629 quote
    FallafelFallafel
    Participant
    Average

    Hello GraHal.

    If I would like to have the bollingerband middle as buy or sell condition?

    For example If Its under bollinger middle It goes long and If Its over It goes short and then close after 5 hours?

    #19637 quote
    StephanStephan
    Participant
    New

    Thanks for the reply GraHal 🙂  i will try it out!

Viewing 4 posts - 1 through 4 (of 4 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 a position after 3 hours


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Stephan @stephan Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by StephanStephan
9 years, 9 months ago.

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