Calculating the quantity using the formula. Risk management
under review
Colya
Now, when trading using TV signals, it is impossible to connect more than 1 instrument and not violate risk management.
Risk management has rules:
- StopLoss
- Floating deposit
- Ongoing risk
Now, we can set all the parameters in TV and transfer them to Finandy.
But it turns out that the TV strategy starts with an initial (basic) deposit and doesn't know what deposit is right now, taking into account the situation on other trading instruments using the same strategy.
If I simultaneously launch the strategy on more than one instrument using one deposit at the start, then by the second trade I don't know what my current deposit actually is. Because TV strategies are isolated from each other and there is no way to solve this in TV.
Therefore, it is necessary to automatically calculate the number of contracts within Finandy when a signal is received.
In the “Open” tab, in the quantity settings, you need to expand the functionality.
To calculate the quantity, 4 parameters are required:
- Current deposit (account balance)
- Risk (as a percentage of deposit)
- Entry price
- StopLoss Price
Through the webhook, we transfer information about the entry price and the SL price.
Finandy knows the account size.
All that remains is to transfer% of risk or create an additional variable within the terminal.
What does it look like in my opinion:
- In quantity, choose “Calculate quantity”
- There are 3 additional fields:
• Risk per trade,%: 2 or {{Risk}}
• Entry price: {{Open}}
• SL Price: {{StopLoss}}
• The account size is known
And then the quantity is calculated using the formula:
Quantity = Deposit*Risk (%)/(StopLoss—Open)
Quantity = 1000* 1%/(120 - 150) = 10/ -30 = |0.333|
But the ideal, of course, is to introduce the ability to prescribe a function for calculating a parameter. For example, in order not to keep the entire deposit on Finandy and to calculate the quantity, you could simply add a number to your current balance.
Such functionality, with the ability to prescribe a function for calculating the quantity, will also help to properly set up copy trading, because copying trades require an individual quantity calculation, independent of the master trader.
I would be happy if you implement it! Thanks)
Photo Viewer
View photos in a modal
Finandy Exchange
marked this post as
under review
Finandy Exchange
Do you need to add the ability to calculate the order number in the SL module in Hooks depending on the risk in% or in absolute terms and the SL price?
Photo Viewer
View photos in a modal
Colya
Finandy Exchange: In the current request, we have a proposal to work with the OTKR module.
It should not be necessary and possible to calculate the volume and control the risk in such a situation through other modules.
The risk and volume are determined before entering a trade, that is, the Open tab.
In the attached screenshots, I visualized the idea and also gave formulas.