Set stop loss back in time

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27222 quote
    thewidde
    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
    Wing
    Participant
    Veteran

    Question 1:

    SET STOP LOSS close-low[5]

    Question 2:

    SET STOP LOSS close-lowest[5](low)
    #27239 quote
    thewidde
    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.

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 thewidde
9 years ago.

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