Support Board
Date/Time: Tue, 26 Nov 2024 09:31:11 +0000
New user needs help
View Count: 659
[2023-12-13 23:41:10] |
User209431 - Posts: 108 |
Great news, let me play around. Honestly it is crazy how difficult it is to find. The more amazing thing is that IB TWS has it and it works lol.
|
[2023-12-14 00:13:50] |
User209431 - Posts: 108 |
Not sure I can see what you do. I would need (account size) / (share Price) 25000/10 = 2500 position size for the stock. You think that can be done this way? I can use the "chart values for tools" and get my entry price. Just need a way to divide it by the money I am risking, that will give the shares. I could just type them in to the chart or perhaps there is a way to make it load in. I am thinking create an indicator which I can put any account size into and that will get the "chart value from tools" of my crosshairs stock price from the chart and do the division. Then in "chart values for tools" the indicator value can be shown anytime I am on a price with the crosshairs? Have an input for "Account Size" and have the indicator always divide the crosshairs value by it? Then if there is a way to send that value to the chart window "quantity" input all the better. Let me know what you think. Or if your method is much easier let me know. Amount of account value I am willing to risk is part of the equation. That for the most part always remains the same. Thanks for the help on this! Date Time Of Last Edit: 2023-12-14 00:15:29
|
[2023-12-14 14:49:48] |
John - SC Support - Posts: 36286 |
Like we said, the tools are not perfect, just a thought. It does not have the account value anywhere, you would need to know this ahead of time. You can then adjust the quantity until you see the currency value you want to apply. The other items you are talking about could be done by creating a custom study. The function to get the account balance is the following: sc.GetTradeServiceAccountBalanceForTradeAccount() A list of programmers that we know of is at the following link: List of Third Party Sierra Chart Study and System Programmers For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-14 15:16:22] |
User209431 - Posts: 108 |
I might see it. Are you saying I can make the "CV" any number I want so like 25K? Do you do this by changing a symbol? TIA |
[2023-12-14 15:46:11] |
User209431 - Posts: 108 |
// Define account risk and entry price
float account_risk = 25000.0; float entry_price = 50.0; // Replace with your desired entry price // Calculate stop loss price based on a 4% risk float risk_percentage = 0.04; // 4% float stop_loss_price = entry_price - (entry_price * risk_percentage); // Calculate position size float position_size = account_risk / (entry_price - stop_loss_price); // Print or display the calculated values print("Entry Price: " + entry_price); print("Stop Loss Price: " + stop_loss_price); print("Calculated Position Size: " + position_size); Pardon my coding, I really do not know what I am doing but I get by so far, "Necessity is the mother of invention" But I was seeing something like the code above. I just need to see the values quickly, punching them in is not a deal breaker. Date Time Of Last Edit: 2023-12-14 15:47:03
|
[2023-12-14 15:48:05] |
User209431 - Posts: 108 |
BTW, I think this would be a very popular tool if I can figure it out.
|
[2023-12-14 16:00:17] |
User584084 - Posts: 262 |
SierraChart Custom C++ Study | Auto Risk Reward Tool For OCO Orders | Coding https://www.youtube.com/watch?v=xM0it-AiZ3Y |
[2023-12-14 16:39:33] |
User209431 - Posts: 108 |
LMAO, honesty for position sizing I might be fine just asking "Alexa" ... Unreal this new world is. I will keep working on the indicator though and any advice is appreciated. This moves me to the next area I think we briefly covered: Attached "Hard" Stop Is there a way to attach a stop for a fixed amount? If I always only want to risk $100 per trade regardless of stock, price, and so on. There are typically a few ways to do it such as a fixed % or just actual cash value such as $100. I typically have done it with a fixed % such as Entry Price * Risk in % (.04) and then that value is subtracted from the Entry Price. Date Time Of Last Edit: 2023-12-14 16:48:56
|
[2023-12-14 19:55:55] |
Sierra_Chart Engineering - Posts: 17179 |
You can use Attached Orders for a fixed Stop order based on a percentage. Refer to: Attached Orders: Step-By-Step Instructions Attached Orders: Offset Values Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-14 20:15:00] |
User209431 - Posts: 108 |
This is great news and thank you!. Can you please help me on how to get raw C++ code into Sierra Chart studies? I understand how to find the file and build it, I cannot for the life of me get the code to .CPP and find it to upload to builder. TIA |
[2023-12-14 20:35:46] |
John - SC Support - Posts: 36286 |
Refer to the following: How to Build an Advanced Custom Study from Source Code: Step-By-Step Instructions For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-12-14 21:08:21] |
User209431 - Posts: 108 |
Dump that last request. My position sizing through Alexa is gonna work fine. The (more important) attached stop loss as a fixed % has made my day. Starting to enjoy the software now! But still have a few more things I need, which I will start a new thread on. Thanks so much for all the help! |
To post a message in this thread, you need to log in with your Sierra Chart account: