MA Crossover

Doji gravestones, Candlesticks. No, it's not a haunted house, it's your own custom advanced charting!
User avatar
mcgoo
Posts: 898
Joined: Thu Jul 18, 2013 12:30 pm

Be nice to be able to track MA/SMA/ EMA via SV's/History lists ( a couple more history lists would be nice too-disk/memory thrashing notwithstanding-say 15? :P ). I can see how you can do it in Excel but prefer doing it all in BA as I find doing it in excel via formulas a little clunky.. I can't see how you could currently do it using History/calculated lists-specially if you wanted to weight the latest numbers versus earlier numbers , but maybe its my chemo brain and I have missed a trick.On that front its taking me too long to learn Python too :) :?
All the best to you all-am still greatly enjoying reading this forum-thanks :D :mrgreen:
User avatar
Realrocknrolla
Posts: 1903
Joined: Fri Jun 05, 2020 7:15 pm

mcgoo wrote:
Sun Jan 31, 2021 7:44 am
Be nice to be able to track MA/SMA/ EMA via SV's/History lists ( a couple more history lists would be nice too-disk/memory thrashing notwithstanding-say 15? :P ). I can see how you can do it in Excel but prefer doing it all in BA as I find doing it in excel via formulas a little clunky.. I can't see how you could currently do it using History/calculated lists-specially if you wanted to weight the latest numbers versus earlier numbers , but maybe its my chemo brain and I have missed a trick.On that front its taking me too long to learn Python too :) :?
All the best to you all-am still greatly enjoying reading this forum-thanks :D :mrgreen:
You lost me at excel 🤣🤣🤣
User avatar
Trader724
Posts: 559
Joined: Fri Dec 27, 2019 11:22 pm

What is Excel?
User avatar
Realrocknrolla
Posts: 1903
Joined: Fri Jun 05, 2020 7:15 pm

Trader724 wrote:
Sun Jan 31, 2021 11:35 am
What is Excel?
I thought it was short for excellent! ;)
User avatar
Trader724
Posts: 559
Joined: Fri Dec 27, 2019 11:22 pm

Excelsior.
User avatar
Kai
Posts: 6092
Joined: Tue Jan 20, 2015 12:21 pm

Trader724 wrote:
Sun Jan 31, 2021 11:35 am
What is Excel?
It's that spreadsheet app that everyone lies about on their job application.

Image
User avatar
Trader724
Posts: 559
Joined: Fri Dec 27, 2019 11:22 pm

20210131_151615.jpg
You do not have the required permissions to view the files attached to this post.
PerthO
Posts: 7
Joined: Thu Feb 13, 2020 11:56 pm

Hi Mcgoo

You can do this in Guardian if you want to.
here's a rough explanation (for 30 seconds moving average) :


For each price => add to total_price
counter = counter + 1
avg_price = total_price / counter
store in history list
.
.
.up to price 30


for prices beyond 30 seconds :
total_price = total_price * (29/30)
total_price = total_price + price
avg_price = total_price / 30
store in history list

Hope that helps !!!!!
I can probably post an example rule if that's not clear, but might be in a few days' time
User avatar
Kai
Posts: 6092
Joined: Tue Jan 20, 2015 12:21 pm

mcgoo wrote:
Sun Jan 31, 2021 7:44 am
I can't see how you could currently do it using History/calculated lists-specially if you wanted to weight the latest numbers versus earlier numbers , but maybe its my chemo brain and I have missed a trick.On that front its taking me too long to learn Python too :) :?
All the best to you all-am still greatly enjoying reading this forum-thanks :D :mrgreen:
Hope you're well mcgoo :)
User avatar
mcgoo
Posts: 898
Joined: Thu Jul 18, 2013 12:30 pm

PerthO wrote:
Mon Feb 01, 2021 10:28 am
Hi Mcgoo

You can do this in Guardian if you want to.
here's a rough explanation (for 30 seconds moving average) :


For each price => add to total_price
counter = counter + 1
avg_price = total_price / counter
store in history list
.
.
.up to price 30


for prices beyond 30 seconds :
total_price = total_price * (29/30)
total_price = total_price + price
avg_price = total_price / 30
store in history list

Hope that helps !!!!!
I can probably post an example rule if that's not clear, but might be in a few days' time
That looks very interesting PerthO. Thanks for that. ..though I might need an example indeed to get my head around it properly. Then I can try calculate the EMA vs MA as well. (Chemo does fog the brain something fierce so it takes me a while to read things and think them through :? ) Cheers for the help
User avatar
mcgoo
Posts: 898
Joined: Thu Jul 18, 2013 12:30 pm

Kai wrote:
Mon Feb 01, 2021 10:46 am
mcgoo wrote:
Sun Jan 31, 2021 7:44 am
I can't see how you could currently do it using History/calculated lists-specially if you wanted to weight the latest numbers versus earlier numbers , but maybe its my chemo brain and I have missed a trick.On that front its taking me too long to learn Python too :) :?
All the best to you all-am still greatly enjoying reading this forum-thanks :D :mrgreen:
Hope you're well mcgoo :)
Cheers pal-thanks for the thoughts mate. Hanging in. A rough trot this thing for sure but I try get up each day with the ol one-thing-at-a-time mindset and that helps :)
User avatar
Kai
Posts: 6092
Joined: Tue Jan 20, 2015 12:21 pm

mcgoo wrote:
Mon Feb 01, 2021 10:37 pm
Kai wrote:
Mon Feb 01, 2021 10:46 am
mcgoo wrote:
Sun Jan 31, 2021 7:44 am
I can't see how you could currently do it using History/calculated lists-specially if you wanted to weight the latest numbers versus earlier numbers , but maybe its my chemo brain and I have missed a trick.On that front its taking me too long to learn Python too :) :?
All the best to you all-am still greatly enjoying reading this forum-thanks :D :mrgreen:
Hope you're well mcgoo :)
Cheers pal-thanks for the thoughts mate. Hanging in. A rough trot this thing for sure but I try get up each day with the ol one-thing-at-a-time mindset and that helps :)
That's good to hear, hope you're not getting spammed by forum notifications from the corona thread that you started :D

Hopefully you've unsubscribed from it 300+ pages ago, it even got locked at one point :lol:
User avatar
mcgoo
Posts: 898
Joined: Thu Jul 18, 2013 12:30 pm

Kai wrote:
Mon Feb 01, 2021 11:08 pm
mcgoo wrote:
Mon Feb 01, 2021 10:37 pm
Kai wrote:
Mon Feb 01, 2021 10:46 am


Hope you're well mcgoo :)
Cheers pal-thanks for the thoughts mate. Hanging in. A rough trot this thing for sure but I try get up each day with the ol one-thing-at-a-time mindset and that helps :)
That's good to hear, hope you're not getting spammed by forum notifications from the corona thread that you started :D

Hopefully you've unsubscribed from it 300+ pages ago, it even got locked at one point :lol:
No notifications thankfully :D
PerthO
Posts: 7
Joined: Thu Feb 13, 2020 11:56 pm

Hi McGoo

Here's a rules file which I think will give you a vwap moving average.
Just change the value of "traded_time" in the first step (currently set to 30).
It puts the values in a stored value called vwap and in History list 2.
Let me know if anything doesn't work as expected.
moving vwap.baf
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Advanced charting”