logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
emmarsef$  
#1 Posted : Wednesday, August 14, 2019 7:10:35 AM(UTC)
emmarsef$

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 8/7/2019(UTC)
Posts: 1
Location: adelaide

Hello!

I'm looking two write an indicator formula and a system testing formula and I'm hoping someone will be able to help.

I currently have three Hull Moving Averages: MA Short Period: 9 MA Long Period: 21 Major Period: 50 and I'm after a Metastock formula to display buy/sell signals: xUpMajor = crossover(avg(ma_short, ma_long), ma_major) xDownMajor = crossunder(avg(ma_short, ma_long), ma_major) Then once i have those signals, I would like to be able to run system testing that tests for these signals in-conjunction with the start of a parabolic SAR.

MS Support  
#2 Posted : Monday, August 19, 2019 3:30:35 PM(UTC)
MS Support

Rank: Advanced Member

Groups: Moderators, Registered, Registered Users, Subscribers
Joined: 10/8/2010(UTC)
Posts: 1,929

Thanks: 85 times
Was thanked: 154 time(s) in 150 post(s)
Originally Posted by: emmarsef$ Go to Quoted Post

Hello!

I'm looking two write an indicator formula and a system testing formula and I'm hoping someone will be able to help.

I currently have three Hull Moving Averages: MA Short Period: 9 MA Long Period: 21 Major Period: 50 and I'm after a Metastock formula to display buy/sell signals: xUpMajor = crossover(avg(ma_short, ma_long), ma_major) xDownMajor = crossunder(avg(ma_short, ma_long), ma_major) Then once i have those signals, I would like to be able to run system testing that tests for these signals in-conjunction with the start of a parabolic SAR.

Hello,

The basic concept is pretty straightforward. You would mostly just be using a  number of Cross functions and averages.

MetaStock's Cross function determines it's cross direction based on the order of the items inside the parentheses: Cross(UpValue,DownValue). The general logic would be as follows:

Code:
Cross((ShortMA+LongMA)/2,MajorMA) AND Cross(C,SAR(0.02,0.20))

This is not exact code. However you are defining the Hull Moving Averages would also need to be written out (potentially as variables) where ShortMA, LongMA, and MajorMA are listed. The other cross direction would simply take reversing the items listed within the functions:

Code:
Cross(MajorMA,(ShortMA+LongMA)/2) AND Cross(SAR(0.02,0.20),C)

Edited by user Friday, August 23, 2019 2:50:50 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.