Stoploss doesn’t work on Backtest

Viewing 31 post (of 31 total)
  • Author
    Posts
  • #167635 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    The stop loss works fine.

    The issue is that the STOP order at line 35 is placed the next candle, not immediately on entry, because the ONMARKET status is updated at the closing of the entry candle.

    Add this line between 19 and 20:

    Sell at Stoploss Stop
Viewing 31 post (of 31 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

Stoploss doesn’t work on Backtest


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Malend @malend Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 04/14/2021
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...