Mediterraneo
New member
I am trying to create an indicator which relates money flow of the displayed security to money flow of a reference security, for instance comparing AAPL to SPY etc. Would appreciate guidance on how to do that. Thanks
declare lower;
input Sym1 = "AAPL";
input Sym2 = "SPY";
input Length = 12;
Script MF {
input Sym = "";
input Lng = 12;
plot MF = MoneyFlow(
high = High(Sym),
close = Close(Sym),
low = Low(Sym),
volume = Volume(Sym),
length = Lng
);
}
def x = MF(Sym1,Length);
def y = MF(Sym2,Length);
plot z = x - y;
Are you referring the money flow as in the indicator entitled by that name? Thus, is there a certain indicator that you would like to chart for a different security, like the indicator money flow of AAPL on a SPY chart?I am trying to create an indicator which relates money flow of the displayed security to money flow of a reference security, for instance comparing AAPL to SPY etc. Would appreciate guidance on how to do that. Thanks
declare lower;
input Sym1 = "AAPL";
input Sym2 = "SPY";
input Length = 12;
Script MF {
input Sym = "";
input Lng = 12;
plot MF = MoneyFlow(
high = High(Sym),
close = Close(Sym),
low = Low(Sym),
volume = Volume(Sym),
length = Lng
);
}
def x = MF(Sym1,Length);
def y = MF(Sym2,Length);
plot z = x - y;
declare lower;
input Sym2 = "SPY";
input Length = 12;
Script MF {
input Sym = "";
input Lng = 12;
plot MF = MoneyFlow(
high = High(Sym),
close = Close(Sym),
low = Low(Sym),
volume = Volume(Sym),
length = Lng
);
}
def x = MoneyFlow(high,close,low,volume,Length);
def y = MF(Sym2,Length);
plot z = x - y;
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
S | Referencing a custom study in Scan Hacker | Questions | 1 | |
S | Referencing another custom study from study | Questions | 4 | |
C | Code referencing other stocks not working properly | Questions | 2 | |
![]() |
referencing FPL() in a strategy (to set a daily $ cap) | Questions | 1 | |
M | Referencing Floating P/L (FPL()) in scans? | Questions | 2 |
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.