Hi. I'm trying to create a strategy that uses CoverAtATRLimitStop. I want to use this function as a way to implement Chandelier Trailing Stops. I've got three questions.
First, what does ATR mean?
Second, no matter where I put it in my strategy I get an error that says its not allowed in this context. Could someone please give me an idea of where to put this thing?
Third, the description of how to use it is very sparce and doesn't give any example of how to use it to implement a trailing stop,. Actually there's no description of how to use it at all. This is also true for a companion function as well. Can someone please provide some documentation that describes the functions, how to use them in their simple form, and how to use them to implement trailing strips? Also, could someone please give me a working code example like those in the documentation that shows how to use it to implement trailing stops?
I know this is a big ask but if someone can provide the information I've requested maybe it can be added to the documentation and other users can benefit by using it to manage their trades.
Thanks!
First, what does ATR mean?
Second, no matter where I put it in my strategy I get an error that says its not allowed in this context. Could someone please give me an idea of where to put this thing?
Third, the description of how to use it is very sparce and doesn't give any example of how to use it to implement a trailing stop,. Actually there's no description of how to use it at all. This is also true for a companion function as well. Can someone please provide some documentation that describes the functions, how to use them in their simple form, and how to use them to implement trailing strips? Also, could someone please give me a working code example like those in the documentation that shows how to use it to implement trailing stops?
I know this is a big ask but if someone can provide the information I've requested maybe it can be added to the documentation and other users can benefit by using it to manage their trades.
Thanks!
Rename
QUOTE:ATR - Average True Range indicator.
First, what does ATR mean?
Open a block strategy and strike F1. Click on a hyperlink for Entries or Exits and scroll down to Additional Exit Blocks > At ATR Profit Target/Stop Loss/Trailing Stop
QUOTE:Cover implies a short position, so it must go below a Short Entry. (First step: remove the Buy At block and replace it with a Short At entry block.)
Could someone please give me an idea of where to put this thing?
QUOTE:See above (F1).
Can someone please provide some documentation.
Since it is a Cover exit, it needs to be paired with the Short entry. Here is a minimal example:
Thanks for the example of using the drag/drop interface.
But, I'm planning on adding this function to a C++ strategy. Could you please provide a code example?
Thanks!
But, I'm planning on adding this function to a C++ strategy. Could you please provide a code example?
Thanks!
C++ is not something Wealth-Lab has ever supported. Click the "Open as C# Coded Strategy" button after you're done with prototyping your code in Blocks.
Honestly, if you're new to WL and C#, I would:
1) pick a somewhat simple C# sample strategy to study first. In the Sample Strategy folder, take a look at "Combining RSI with RSI".
2) avoid Short and Cover trades. They are much more difficult to profit from. I don't even use them. Use Long trades instead.
3) avoid TrailingStops for now. But pick them up latter. They are a good tool to use. But you don't need them initially. Get something working in C# first; then add TrailingStops to it for improvement. There's a discussion about using TrailingStops in the first part of https://www.wealth-lab.com/Discussion/Position-IsOpen-check-10253
1) pick a somewhat simple C# sample strategy to study first. In the Sample Strategy folder, take a look at "Combining RSI with RSI".
2) avoid Short and Cover trades. They are much more difficult to profit from. I don't even use them. Use Long trades instead.
3) avoid TrailingStops for now. But pick them up latter. They are a good tool to use. But you don't need them initially. Get something working in C# first; then add TrailingStops to it for improvement. There's a discussion about using TrailingStops in the first part of https://www.wealth-lab.com/Discussion/Position-IsOpen-check-10253
Your Response
Post
Edit Post
Login is required