Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using ATR for StopLoss

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using ATR for StopLoss

    I'm following the directions from this previous post. Unfortunately, it does not seem to work. The following images show 1) the directions i was using to set it up. 2) how it was set up. & 3) the error messages I'm getting. The two different error messages reflect the difference between using a "Bars ago" value of 0 versus 1 for the Stop Loss Value calculation. Using "0" the error was "Object reference not set" When set to "1" the error changed to "out-of-range" Regardless of the "Bars ago" setting the strategy turns off immediately when trying to enable it and produces the error messages mentioned.

    It did work briefly until i tried to set the Offset to "*" and used a value of 1.5 rather than a whole integer.

    Click image for larger version

Name:	Screenshot 2023-06-06 081354.png
Views:	209
Size:	47.1 KB
ID:	1254795

    Click image for larger version

Name:	Screenshot 2023-06-06 081618.png
Views:	182
Size:	12.3 KB
ID:	1254796

    Click image for larger version

Name:	Screenshot 2023-06-06 081557.png
Views:	207
Size:	15.7 KB
ID:	1254797

    #2
    Hello, thanks for writing in. There can be no use of Indicator data from the Stops and Targets section. This is because the stops and targets are set up during the launch of the script rather than be placed in real time. You will need to use Exit orders instead. We have a related example here:

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    65 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    199 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    365 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    283 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X