defining stop and exit

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #62999 quote
    George65George65
    Participant
    Senior

    Hi,

    Please, anyone could help how we define in coding the previous local high, and local low?

    I’d like to code to exit a long trade when price exceeds the previous local high (we do not exactly know, how many bars we’ve had since then), and

    stop, when price goes below the previous local low

    Thank you!

    George

    #63018 quote
    DespairDespair
    Blocked
    Master

    You must define your local high/low better. Is it maybe the highest/lowest of the last X bars? That for example is easy to code.

    #63020 quote
    EricEric
    Participant
    Master
    #63023 quote
    George65George65
    Participant
    Senior

    Despair, Eric

    Thanks, both of you!

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

defining stop and exit


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
George65 @george65 Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by George65George65
8 years, 7 months ago.

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