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

Notification

Icon
Error

Options
Go to last post Go to first unread
south54  
#1 Posted : Saturday, March 19, 2016 2:30:21 PM(UTC)
south54

Rank: Newbie

Groups: Registered Users, Subscribers, Unverified Users
Joined: 11/15/2014(UTC)
Posts: 4

Help please,

I have copied the code from the October 2015 article and it doesn't work, comes up with different error messages. Any help would be appreciated.

MetaStock Code For MFO
LL := Security(“.DJI”,L);
HH:= Security(“.DJI”,H);
{avoid division by zero}
Dvs:=If((HH-Ref(LL ,-1))+(Ref(HH,-1)-LL )=0,.00001,

(HHRef(LL ,-1)+(Ref(HH,-1)-LL )));
MLT P:=If(HH<Ref(LL ,-1),-1,If(LL >Ref(HH,-1),1,((HHRef(
LL ,-1))-(Ref(HH,-1)-LL ))/dvs));
{avoid division by zero}
Dvsv:=If(V=0,.00001,V);
Sum((MLT P*V),20)/Sum(Dvsv,20);

mstt  
#2 Posted : Saturday, March 19, 2016 7:33:30 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi south54 The code below works for me but you might still find that quotation marks in the LL and HH variables might still appear as illegal characters when pasted into MetaStock as an indicator. If this happens then just replace those characters with the quotes character (") on your keyboard. Another issue with the formula is that there is no pathname for the DJI security. A full pathname is probably required. The third issue was that "MLTP" was actually entered as "MLT P" - spaces in variable names are not permitted. {MetaStock Code For MFO} LL:= Security(".DJI",L); HH:= Security(".DJI",H); {avoid division by zero} Dvs:=If((HH-Ref(LL ,-1))+(Ref(HH,-1)-LL)=0, 0.00001, (HH-Ref(LL ,-1)+(Ref(HH,-1)-LL ))); MLTP:=If(HH<Ref(LL ,-1),-1,If(LL >Ref(HH,-1),1,((HH-Ref( LL,-1))-(Ref(HH,-1)-LL ))/dvs)); {avoid division by zero} Dvsv:=If(V=0,.00001,V); Sum((MLTP*V),20)/Sum(Dvsv,20); Roy
south54  
#3 Posted : Sunday, March 20, 2016 3:00:31 AM(UTC)
south54

Rank: Newbie

Groups: Registered Users, Subscribers, Unverified Users
Joined: 11/15/2014(UTC)
Posts: 4

Thanks for your assistance, I also wrote to the author and he replied: Hi Zelko, Thank for your letter. Something is wrong with (“) in your code. This is MetaStock code for MFO: LL:= Security(".DJI",L); HH:= Security(".DJI",H); {avoid division by zero} Dvs:=If((HH-Ref(LL,-1))+(Ref(HH,-1)-LL)=0,.00001,(HH-Ref(LL,-1)+(Ref(HH,-1)-LL))); MLTP:=If(HH<Ref(LL,-1),-1,If(LL>Ref(HH,-1),1,((HH-Ref(LL,-1))-(Ref(HH,-1)-LL))/dvs)); {avoid division by zero} Dvsv:=If(V=0,.00001,V); Sum((MLTP*V),20)/Sum(Dvsv,20); Best Regards, Vitali Apirine From: Zelko Mustac Sent: Saturday, March 19, 2016 9:40 AM To: vitapirine@mediacombb.net Subject: Money Flow Oscillator Zelko Mustac <zelko.mustac@gmail.com> 10:50 AM (6 minutes ago) to vitali Many thanks Working perfectly now! you are right gives an indication of change of trend quicker than MACD. Very helpful Cheers
Users browsing this topic
Guest (Hidden)
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.