Would you veterans out their help me locate the MFI in a histogram format? Thank you.
Announcement
Collapse
No announcement yet.
Mfi
Collapse
X
-
Wavethree3
Try running a Search in the Bulletin Board using moneyflow as the keyword.
If nothing turns up you can easily modify the builtinMoneyFlow.efs which is in the Builtin subfolder of Formulas. To do this add the following statements to preMain
setPlotType(PLOTTYPE_HISTOGRAM);
setHistogramBase(50);
These will make the study plot as a histogram
Alex
-
MFI answer not clear
Alexis, I appreciate your answer but I am not understanding it. I am new at this forum and it is all a little like GREEK to me. I tried to search for "moneyflow" and our thread came up. I don't know where the subfolder of formulas is. Could you help me find the moneyflow.efs? And then to modify it? Thank you.
Comment
-
Wavethree3
In the main menu of eSignal click Tools->EFS->Editor..
This will open the Formula Editor window. Click the Open icon in the Editor Window then click the + sign next to the Builtin folder.
Select the builtinMoneyFlow.efs from the list and click the Open button.
When the formula appears insert just under the line that reads
setStudyMax(100);
the following two lines of code (you can copy and paste them from here)
setPlotType(PLOTTYPE_HISTOGRAM);
setHistogramBase(50);
Save the formula and close the Editor window.
At that point right click the chart, select Formulas then Builtin and click on builtinMoneyFlow.efs and it will be applied to your chart
Alex
Comment
-
Thanks ALexis. I did it.
It looks different than what I thought. Is this the same MFI that Bill Williams uses that is simply the range of a bar divided by that days volume, or High-Low/Vol=MFI.
Bill Williams uses the current bar MFI to compare to the previous days bar MFI. If todays bar MFI is higher than yesterdays bar MFI, he colors it bright green. If todays bar MFI is lower than yesterdays bar MFI he colors it red.
Could I color the bars accordingly?
Finally, it looks to me like the MFI histogram Bill Williams uses is always positive or above the zero line of the histogram. Would this be right? Could this be done?
Thank you.
Comment
-
Wavethree3
Sorry by mistake I provided an incorrect setting. The statement setHistogramBase(50); should have been setHistogramBase(0);
As to coloring the histogram bars you would need to add some conditions similar to the following right after the comment section "Insert your code...etc etc)
PHP Code:if(vMF.getValue(MoneyFlowStudy.MONEYFLOW,0) < vMF.getValue(MoneyFlowStudy.MONEYFLOW,-1))
setBarFgColor(Color.red);
FYI this study can be easily written using the Formula Wizard. For more information on the Formula Wizard you may want to read the Formula Wizard Guide in the EFS KnowledgeBase
Alex
Comment
-
I need help with a new formula
It works fine Alexis, thanks. I copied and pasted an additional line and made it “green” when the bar is greater then the previous days volume. Now it is “red” when it is lower and “green” when it is higher.
Could I ask one more favor? I tried to use the Formula Wizard but could not seem to understand enough to do what I wanted. May I ask your help one more time?
I copied and pasted this formula from a previous one that Bill Williams used to locate a SQUAT BAR and to color it white:
if (((high()-low())/volume()) < ((high(-1)-low(-1))/volume(-1))&&
volume() > volume(-1)) {
setPriceBarColor(Color.white)
I would like to use the same language to show 4 possible combinations, with the result of each combination being displayed as a COLORED DOT at the very top and very bottom of the price chart beginning with the right edge of the chart and going back 5 bars. This would mean that I would have only 5 colored bars at the very top and very bottom of the screen at all times for the 5 most recent bars.
The combinations would be as follows:
if (((high()-low())/volume()) > ((high(-1)-low(-1))/volume(-1))&&
volume() > volume(-1)) {
PUT A YELLOW DOT above and below price bar at top top/bottom of the screen
if (((high()-low())/volume()) < ((high(-1)-low(-1))/volume(-1))&&
volume() < volume(-1)) {
PUT A BLUE DOT above and below price bar at the top/bottom of the screen
if (((high()-low())/volume()) > ((high(-1)-low(-1))/volume(-1))&&
volume() < volume(-1)) {
PUT A RED DOT above and below price bar at the top/bottom of the screen
if (((high()-low())/volume()) < ((high(-1)-low(-1))/volume(-1))&&
volume() > volume(-1)) {
PUT A WHITE DOT above and below price bar at the top/bottom of the screen
Thanks for your help.
Comment
-
Wavethree3
The enclosed example shows you how to write the efs. Comments are in the script
Alex
PHP Code:function preMain() {
setPriceStudy(true);
setStudyTitle("Squat");
setShowCursorLabel(false);
//setColorPriceBars(true);
//setDefaultPriceBarColor(Color.black);
}
function main() {
if (((high()-low())/volume()) < ((high(-1)-low(-1))/volume(-1))&&
volume() > volume(-1)){
drawShapeRelative(0,5,Shape.CIRCLE,"",Color.blue,Shape.RELATIVETOTOP,"blue_top");
drawShapeRelative(0,2,Shape.CIRCLE,"",Color.blue,Shape.RELATIVETOBOTTOM,"blue_bottom");
}
//add your other conditions here just as they are written in your post
//for the dots (ie CIRCLE) use the same syntax shown above replacing only the color and the
//tag name ie "red_top" or "yellow_bottom" etc
//the tag names will ensure that only the last (top/bottom) dot of each color will be
//displayed
return null;
}
Comment
-
Hello Alexis,
Below I copied and pasted what I came up with. It does not work though. It has error messages that I do not understand how to fix. Can you look at it and correct them for me?
function preMain() {
setPriceStudy(true);
setStudyTitle("Squat");
setShowCursorLabel(false);
//setColorPriceBars(true);
//setDefaultPriceBarColor(Color.black);
}
function main() {
if (((high()-low())/volume()) > ((high(-1)-low(-1))/volume(-1))&&
volume() > volume(-1)){
drawShapeRelative(0,5,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOTOP,"yellow_top");
drawShapeRelative(0,2,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOBOTTOM,"yellow_bottom");
if (((high()-low())/volume()) < ((high(-1)-low(-1))/volume(-1))&&
volume() < volume(-1)){
drawShapeRelative(0,5,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOTOP,"blue_top");
drawShapeRelative(0,2,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOBOTTOM,"blue_bottom");
if (((high()-low())/volume()) > ((high(-1)-low(-1))/volume(-1))&&
volume() < volume(-1)){
drawShapeRelative(0,5,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOTOP,"red_top");
drawShapeRelative(0,2,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOBOTTOM,"red_bottom");
if (((high()-low())/volume()) < ((high(-1)-low(-1))/volume(-1))&&
volume() > volume(-1)){
drawShapeRelative(0,5,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOTOP,"white_top");
drawShapeRelative(0,2,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOBOTTOM,"white_bottom");
}
//add your other conditions here just as they are written in your post
//for the dots (ie CIRCLE) use the same syntax shown above replacing only the color and the
//tag name ie "red_top" or "yellow_bottom" etc
//the tag names will ensure that only the last (top/bottom) dot of each color will be
//displayed
return null;
}
Can you also tell me if it will keep 5 running dots at all times on the 5 most recent bars?
Thanks again.
Steve
Comment
-
Alexis,
I got it to work a little. It gives me the following:
Red, _____, _____ , _____, Yellow, White, Blue
In the blanks were supposed to be Yellow, Yellow, Red.
This was done on the SP #F symbol.
Can you help me fill in the colors? I would like every bar (7 most recent bars is enough) to have a dot even if the color repeats itself.
Here is what I have so far:
function preMain() {
setPriceStudy(true);
setStudyTitle("Squat");
setShowCursorLabel(false);
//setColorPriceBars(true);
//setDefaultPriceBarColor(Color.green);
}
function main() {
if (((high()-low())/volume()) > ((high(-1)-low(-1))/volume(-1))&&
volume() > volume(-1)){
drawShapeRelative(0,5,Shape.CIRCLE,"",Color.yellow ,Shape.RELATIVETOTOP,"yellow_top");
drawShapeRelative(0,2,Shape.CIRCLE,"",Color.yellow ,Shape.RELATIVETOBOTTOM,"yellow_bottom");}
if (((high()-low())/volume()) < ((high(-1)-low(-1))/volume(-1))&&
volume() < volume(-1)){
drawShapeRelative(0,5,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOTOP,"blue_top");
drawShapeRelative(0,2,Shape.CIRCLE,"",Color.blue,S hape.RELATIVETOBOTTOM,"blue_bottom");}
if (((high()-low())/volume()) > ((high(-1)-low(-1))/volume(-1))&&
volume() < volume(-1)){
drawShapeRelative(0,5,Shape.CIRCLE,"",Color.red,Sh ape.RELATIVETOTOP,"red_top");
drawShapeRelative(0,2,Shape.CIRCLE,"",Color.red,Sh ape.RELATIVETOBOTTOM,"red_bottom");}
if (((high()-low())/volume()) < ((high(-1)-low(-1))/volume(-1))&&
volume() > volume(-1)){
drawShapeRelative(0,5,Shape.CIRCLE,"",Color.white, Shape.RELATIVETOTOP,"white_top");
drawShapeRelative(0,2,Shape.CIRCLE,"",Color.white, Shape.RELATIVETOBOTTOM,"white_bottom");}
//add your other conditions here just as they are written in your post
//for the dots (ie CIRCLE) use the same syntax shown above replacing only the color and the
//tag name ie "red_top" or "yellow_bottom" etc
//the tag names will ensure that only the last (top/bottom) dot of each color will be
//displayed
return null;
}
Comment
-
Alexis,
I just noticed what is happening watching a 2 minute chart. It seems to make a colored dot on the newest bar and stays with that bar until the same color appears. Then the first colored dot drops off. It will not repeat colors.
Can you help me make it such that each bar has a colored dot for "X" amount of bars even if the colors repeat themselves? Can I control what "X" is, so I can experiment with how many dots I want to use?
Thanks,
Steve
Comment
-
Steve
...Then the first colored dot drops off. It will not repeat colors
That is exactly why in my comments inside the script I wrote "the tag names will ensure that only the last (top/bottom) dot of each color will be displayed"".
Can you help me make it such that each bar has a colored dot for "X" amount of bars even if the colors repeat themselves? Can I control what "X" is, so I can experiment with how many dots I want to use?
First I would suggest that you read through the Guide to Developing EFS Graphics which is in the EFS KnowledgeBase. You may also want to read the other guides which are available at the same link.
To achieve what you want you need to add the following to the script.
1. Just before the line function main() { insert the following
var Counter = 0;
This creates a global variable called Counter and sets it initially to 0.
2. Then in the line that follows function main() { insert the following
if(getBarState()==BARSTATE_NEWBAR){
Counter +=1;
}
What this does is increase by 1 the value of Counter at every new bar.
3. Immediately after insert the following line which will limit the drawing of the dots to the last 10 bars only
if(getCurrentBarIndex()<-10) return;
You can change the value of 10 to whatever you want.
4. Then at the very end of each command that draws a dot add the variable Counter to the tag name. For example
drawShapeRelative(0, 5, Shape.CIRCLE,"", Color.yellow, Shape.RELATIVETOTOP, "yellow_top"+Counter);
The above modification will allow more than one dot of each color to be drawn on the chart.
At this point you have all the information required to implement the changes that you wanted.
Alex
Comment
Comment