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:	219
Size:	47.1 KB
ID:	1254795

    Click image for larger version

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

    Click image for larger version

Name:	Screenshot 2023-06-06 081557.png
Views:	215
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 kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    58 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    41 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    46 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    37 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    157 views
    0 likes
    Last Post SalmaTrader  
    Working...
    X