TradingView
thequantscience
9 Th01 2023 15:56

Probabilities Module - The Quant Science  

Ethereum / TetherUSBinance

Mô tả

This module can be integrate in your code strategy or indicator and will help you to calculate the percentage probability on specific event inside your strategy. The main goal is improve and simplify the workflow if you are trying to build a quantitative strategy or indicator based on statistics or reinforcement model.

Logic
The script made a simulation inside your code based on a single event. For single event mean a trading logic composed by three different objects: entry, take profit, stop loss.
The script scrape in the past through a look back function and return the positive percentage probability about the positive event inside the data sample. In this way you are able to understand and calculate how many time (in percentage term) the conditions inside the single event are positive, helping to create your statistical edge.
You can adjust the look back period in you user interface.

How can set up the module for your use case

At the top of the script you can find:

1. entry_condition: replace the default condition with your specific entry condition.
2. TPcondition_exit: replace the default condition with your specific take profit condition.
3. SLcondition_exit: replace the default condition with your specific stop loss condition.
Bình luận
lukricky
i dont quite understand this script to help traders to determine the buy or sell decesion ? i shall be grateful if u please provide further elaboration :) thanks so much
OutsourcE
How'd you know the take profit parameter, to simulate?
thequantscience
@OutsourcE, hello !

This is a simulator of a single strategy that has one entry, one take profit level, and one stop loss level (on a percentage basis or based on some market condition).
You can simulate and find the profit percentage for the strategy choosing when to trade and when not to trade.

The profitability of the strategy is returned with:

probabilities


You just need to create a check condition like this one below:

probabilities > 60


Hope I have been helpful.
OutsourcE
@thequantscience, thx for the prompt reply.lets say I use stdv for both ,the entry and the take profit, by the time the entry is triggered, it turns out - both are( the entry and the take profit) triggered simultaneously. How'd that work in such a scenario?
OutsourcE
@OutsourcE, let's say the entry is x3 stdv , but take profit is x2 stdv, to be precise. But them both hit at once from the onset. Could you plz elaborate from here on?
Thx
Thêm nữa