Error

 Previous Topic Next Topic
 emmarsef\$ #1 Posted : Wednesday, August 14, 2019 7:10:35 AM(UTC) Rank: NewbieGroups: Registered, Registered Users, SubscribersJoined: 8/7/2019(UTC)Posts: 1Location: 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: 9MA Long Period: 21Major Period: 50and 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.
 Wanna join the discussion?! Login to your Discussions forum accountor Register a new forum account.
 MS Support #2 Posted : Monday, August 19, 2019 3:30:35 PM(UTC) Rank: Advanced MemberGroups: Moderators, Registered, Registered Users, SubscribersJoined: 10/8/2010(UTC)Posts: 1,645Thanks: 54 timesWas thanked: 131 time(s) in 127 post(s) Originally Posted by: emmarsef\$ 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: 9MA Long Period: 21Major Period: 50and 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.