Digital Signal Processing – Defining & Using the Difference Equation
Forums › ProRealTime English forum › General trading discussions › Digital Signal Processing – Defining & Using the Difference Equation
- This topic has 14 replies, 6 voices, and was last updated 5 months ago by SnorreDK.
Tagged: Black and Scholes, Difference, Difference Equation, Equation
-
-
06/27/2021 at 11:29 AM #172558
JS please can you provide a link to an Indicator or script that provides the ‘difference equation’ of price action?
Preferably not a link to reams of theory on Digital Signal Processing. I have scan read such (sincc you mentioned DSP on another Topic) and it has similarities to the theory of radar circuitry (wave frequencies, bandpass filters etc) .
Is there anything on this website that we can use to give us the ‘difference equation’?
Is DSP something new (to us?) that we should try out and you are the man who is going to lead us onward and upward by pointing us to a practicable and usable source of the ‘difference equation’?? 🙂
06/27/2021 at 12:38 PM #172559Hi GraHal,
I hope you understand that I can’t reveal my algorithm because it took me 20 years to come to this point but you are in the right direction, it has similarities to the theory of wave frequencies and filters.
Black and Scholes also used a difference equation for option pricing (only continue instead of discreet).
I can tell you that ALL price action is discreet, lineair and time invariant. Such a system is called a LTD -system.
The general difference equation for a LTD -system is:
It is not that hard, if i can do it you can do it.
1 user thanked author for this post.
06/27/2021 at 1:28 PM #17256106/27/2021 at 2:04 PM #17256506/27/2021 at 3:33 PM #17256806/27/2021 at 4:04 PM #17257006/29/2021 at 6:24 AM #17269406/29/2021 at 7:43 AM #17269706/29/2021 at 2:01 PM #172726Hi GraHal,
Have you any idea how PRT works, what happens when you (for example) use a simple moving average and how it is calculated by PRT?
This is how PRT calculate a SMA:
N = number of samples (or time period)
Xi = Close[n]
Mu or y[n] is the variable
1 user thanked author for this post.
06/30/2021 at 5:52 AM #172758Hi GraHal,
this might be an interesting read
https://eng.libretexts.org/Bookshelves/Electrical_Engineering/Signal_Processing_and_Modeling/Book%3A_Signals_and_Systems_(Baraniuk_et_al.)/12%3A_Z-Transform_and_Discrete_Time_System_Design/12.08%3A_Difference_Equations
1 user thanked author for this post.
06/30/2021 at 10:32 AM #172784Hahaha … nice one! The link casts ‘light on the wizardry’! 🙂
From the definition below of Difference Equation … it sounds similar to momentum?
An equation that shows the relationship between
consecutive values of a sequence and the differences among them.07/27/2021 at 9:31 PM #174270https://www.tradingview.com/chart/GBPUSD/WLP5849o-Digital-Filters-And-DSP/
Interesting article on trading view, shows that a SMA is the basis of a filter…
05/21/2024 at 12:43 PM #232869I used ChatGTP to create a DSP (LCCDE) – code, but no trades. Any Ideas?
DSP-code123456789101112131415161718192021222324DEFPARAM CumulateOrders = False// Definiera koefficienterna för skillnadsekvationena0 = 0.5a1 = 0.3b1 = -0.2// Inledande värdeny = close// Beräkning av DSP-filtery = a0 * close + a1 * close[1] + b1 * y[1]SET STOP %loss 1// Handel logikIF NOT ONMARKET THENIF y > close THENBUY 1 CONTRACT AT MARKETELSIF y < close THENSELLSHORT 1 CONTRACT AT MARKETENDIFENDIFset target %profit 105/21/2024 at 3:52 PM #232885Changing line 12 made it work, but I don’t know if that’s what you wanted:
12345678910111213141516171819202122232425DEFPARAM CumulateOrders = False// Definiera koefficienterna för skillnadsekvationena0 = 0.5a1 = 0.3b1 = -0.2// Inledande värdeny = close// Beräkning av DSP-filtery = a0 * close + a1 * close[1] + b1 * close[2] //changedSET STOP %loss 1// Handel logikIF NOT ONMARKET THENIF y > close THENBUY 1 CONTRACT AT MARKETELSIF y < close THENSELLSHORT 1 CONTRACT AT MARKETENDIFENDIFset target %profit 1graph y05/23/2024 at 8:38 AM #232950Hi Eric,
The system is Time Invariant so it doesn’t matter what timeframe your on.
You can use 5 min, 15 min, 1 hour, etc. and the system will open exactly the same amount of trades…
You dont use the code timeframe(x..) in the code?
-
AuthorPosts
Find exclusive trading pro-tools on