+1 888 340 6572
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_stroke.svg
Please log in to bookmark issues
bug_report_small.png
Open Bug report MC-2965

settrailingstop_pt inaccurate stop placement in live trading

minus.svg
Please log in to vote
0
Votes
pluse.svg
Please log in to vote
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

settrailingstop_pt is issuing incorrect orders in a live situation.

"Long Example"

An entry takes place on the close of a bar. When a new bar is issued, the stop appears to be set from the close of the bar. If price moves favorably then stop will follow. This is expected behavior.

*However
Once in a position (barssinceentry>0) the function will no longer consider the maximum profit of the position. It will instead reset and issue the stop at the close of the last bar - settrailingstop_pt.

If the automation is activated intrabar then the stop will be issued at the current price - settrailingstop_pt.

I am not sure whether this occurs only in real time automation, but I am certainly seeing it happen in that case.

Thank you

Steps to reproduce this issue
  1. Daily chart with Backtesting precision set at "Intraday 1 minute".

  2. IOG turned off.

  3. Autotrading set to "AA"

  4. Using any entry, code to exit is:

[code][value99=100 {100 ticks} ;
settrailingstop_pt(value99);][/code]

Comments (2)
#1
user-offline.png  MultiCharts Support
Aug 29, 2024 - 08:24
Hello,

When the parameter Amount (Profit) is changed, the order starts tracking its state again as if it were canceled and placed anew, ensuring the same behavior in both auto trading and backtesting.
Changes:
  •   icon_status.svgStatus changed: Under Review => Not a bug
#2
user-offline.png  Wave
Aug 29, 2024 - 10:23

Thanks, I can confirm this. Not a bug.

History
Issue basics
  • Type of issue
    Bug report
  • Category
    Not determined
  • Targeted for
    Not determined
  • Status
    Not a bug
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
People involved
  • Posted by
    user-offline.png  Wave
  • Owned by
    Not owned by anyone
  • Assigned to
    Not assigned to anyone
  • Subscribers
    2 subscriber(s)
    Click here to show the list of subscribers
Times and dates
  • Posted at
  • Last updated
Issue details
  • Reproducability
    Not determined
Commits (0)
There are no code checkins for this issue