please explain this line of code with summation instruction

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #162722 quote
    nonethelessnonetheless
    Participant
    Master

    I came across this in someone else’s strategy and, apart from it being an exit code, I don’t entirely understand what it’s doing.

    Most grateful for an explanation in plain language.

    IF LONGONMARKET AND summation[35](close < close[6]) = 35 THEN
    SELL AT MARKET
    ENDIF
    #162723 quote
    JC_BywanJC_Bywan
    Moderator
    Master

    Hi,

    It checks to be true that close was lower than close[6] during each of the last 35 occurences, it saves you from writing the much longer equivalent condition “close<close[6] and close[1]<close[7] and close[2]<close[8] and … and close[34]<close[40]”

    nonetheless thanked this post
    #162724 quote
    nonethelessnonetheless
    Participant
    Master

    Alright, so it’s basically defining the length of a down trend and at what point it will quit.

    Could be useful, thanks for the explanation.

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

please explain this line of code with summation instruction


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by nonethelessnonetheless
5 years, 7 months ago.

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