ATR Trailing Stop – Simplified Creation Issue

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #169103 quote
    YantraYantra
    Participant
    Senior

    When I try to use “PRC_ATR Trailing Stop v2.1” as part of a backtest using simplified creation (i.e. Buy/Sell when slow trail crosses under/over price or alternatively under/over fast trail) I receive the following error message:

    “The function “PRC-ATR Trailing stop v2.1″ returns 2 values but your code needs 3”

    I am using PRT v11 on IG. What am I doing wrong I’m wondering? Any light appreciated.

    Thank you.

    #169150 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    That happens because the indicator uses DRAWCANDLE to paint empty space in between the two lines.

    If you don’t mind that colouring you can comment out line 62:

    //drawcandle(trail1,trail2,trail1,trail2) coloured(rtrail,gtrail,0,50)bordercolor(0,0,0,0)

    or, if you need it, manually modify the created code, removing the second IGNORED from the variables left to the “=” operator with the CALL:

    indicator1, ignored, ignored = CALL "PRC_ATR Trailing Stop v2.1"(close) //before
    indicator1, ignored = CALL "PRC_ATR Trailing Stop v2.1"(close)          //after
Viewing 2 posts - 1 through 2 (of 2 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

ATR Trailing Stop – Simplified Creation Issue


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Yantra @rover220 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
5 years, 4 months ago.

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