Login Page - Create Account

Support Board


Date/Time: Sun, 19 May 2024 11:05:13 +0000



How to calculate position size in programming way?

View Count: 1180

[2018-02-10 13:20:41]
LenderDevTest - Posts: 15
Input data:
Stop loss: 50 ticks
Max risk per trade: $3000

We need to calculate the which Position size we can open to lost not more than $3k if the price hits Stop loss in 50 tick.
How to do this in Sierra charts?

I couldn't find any of examples in tradingsystems.cpp
[2018-02-12 18:31:59]
Sierra Chart Engineering - Posts: 104368
Refer to these ACSIL variables.

You need to use Currency Value Per Tick:
ACSIL Interface Members - Variables and Arrays: sc.CurrencyValuePerTick

And Trade Window Order Quantity:
ACSIL Interface Members - Variables and Arrays: sc.TradeWindowOrderQuantity
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account