Set stop loss back in time

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27222 quote
    thewiddethewidde
    Participant
    New

    Hi.

    I have two questions regarding bars back in time.

    1. How do i set a stop loss to a bar(low) back in time, say five bars ago etcetera?
    if condition AND Not LongOnMarket then
    BUY 2 SHARE AT MARKET
    SET STOP PLOSS currentBar[-5](low)
    endif
    1. And can i use a for loop to index up five bars ago to find the lowest low from those last five bars?

    Best Regards

    #27238 quote
    WingWing
    Participant
    Veteran

    Question 1:

    SET STOP LOSS close-low[5]

    Question 2:

    SET STOP LOSS close-lowest[5](low)
    #27239 quote
    thewiddethewidde
    Participant
    New

    Big thanks Wing <3

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

Set stop loss back in time


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
thewidde @thewidde Participant
Summary

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

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