Numeric Variables

Post Reply
dboanca62
Posts: 19
Joined: Tue Nov 07, 2023 2:55 pm

Numeric Variables

Post by dboanca62 »

Not sure if this will be out of the purpose of this fantastic tool, but I will ask:
Is possible to add some numeric variable definition and options to calculate and display with pause function or at least at the end of back test ?
Example:
I like to calculate how many times in a certain period of time, price gained or lost more than a certain value or percentage.
Thank you !
NakedMarkets
Posts: 251
Joined: Tue Feb 22, 2022 11:06 am

Re: Numeric Variables

Post by NakedMarkets »

Hello,

Could you elaborate a bit please about your need ? How do you want to see this information ?
You'd like to add new rules to have new conditions when the price gain or lose a certain percentage/value in a certain period of time ?
Example : X% of price increase in 1 day or X% of price lost in 1 week ?
Or you want to have more statistics and number about the backtest without using new conditions in rules ?
We ask that because there is an ongoing user request here to scan and generate statistic from the rules triggered.
dboanca62
Posts: 19
Joined: Tue Nov 07, 2023 2:55 pm

Re: Numeric Variables

Post by dboanca62 »

Sorry for delay...yes I like new rule but not only for this example
So, just able to define a numeric variable that can be used for input of indicators properties or just for any input values are used in rules
eg. period for ATR
P=14
ATR period = P
I assume this will require another default folder as "Variables" witch can be executed at beginning of Backtest
Thank you !
NakedMarkets
Posts: 251
Joined: Tue Feb 22, 2022 11:06 am

Re: Numeric Variables

Post by NakedMarkets »

Sorry but we are not sure to understand properly.
In your last post, it looks like you'd like to have some kind of "meta" variable, which could change the value of indicators input, as an example. But in this case, when the user sets the value of these variables ? At the beginning of the backtest ?
And with this implementation, we don't see how we could fill your need of your first post, about knowing the price variation in a certain period of time ?
Could you give us an accurate use case of yours as you imagine using this feature ?

Thanks
dboanca62
Posts: 19
Joined: Tue Nov 07, 2023 2:55 pm

Re: Numeric Variables

Post by dboanca62 »

So, I do test different periods for different indicators and using same indicator multiple times, will be easy/faster to use a variable defined at beginning of backrest for all places where I want to change indicator period. As my example, if at beginning of backtest I define P=14, I can use P instead of numeric input value for indicators properties.
If this still not clear, I have another example:
I want to count during backtest how many consecutive winning/loosing trades and store that in W/L variable. If L>0 than TP=TP*2
If W>0 then TP=SL
or in words, for every consecutive loss, double TP and for first win, TP back as SL (R/R=1)
Just to let you know that English is not my primary language...if still not clear
Thank you anyway !
Post Reply