Wave59 Bulletin Board

 
 
  
 Search
  
 Posted Today
  
 Most Active
  
 Help   
 » Home »   » Wave59 Forums »   » Wave59 Scripts »   » Have mercy


 View Previous Topic
View Next Topic 

   Have mercy
P:  3/3/2010 3:09:19 AM
swamp yankee

Member

Total Posts: 26
Last Post: 3/7/2010
Member Since: 12/28/2009

My first foray into loading a Qscript from the library. I dl'd Christoph's MFI Indicator which is something I use in MT4. It does not appear to display on my chart. Right clicking and choosing format indicators does indeed show "BillWilliam_Profitunity (QScript)"  as well as previously added "Volume (QScript)". Would this relate to the fact that the volume data for forex is "tick_volume" ?

I am eager to include MFI on my charts and welcome any help.

Thanks!

Andy

 


Love runs the Multiverse

Revisions : 0   |    Posted:  3/3/2010 3:09:19 AM   |   IP:  Recorded    |    Report this post


 There are 8 replies to this message.  There are 8 replies on this page.

P: 3/3/2010 11:42:18 AM
earik

Administrator

Total Posts: 2,489
Last Post: 9/3/2010
Member Since: 11/6/2003

Hi Andy,

Yes, any "volume" reference in that script needs to be changed to "tick_volume" to work on FX. You'd have to open that script up in the editor, do a find-replace on that term, then rebuild (file - build). That should do the trick. Also, make sure the chart is set to receive that volume data by going format - chart - data options, and check "tick data" there.

Earik

Revisions : 0   |    Posted:  3/3/2010 11:42:18 AM    |    IP:  Recorded    |    Report this post
P: 3/3/2010 12:12:35 PM
swamp yankee

Member

Total Posts: 26
Last Post: 3/7/2010
Member Since: 12/28/2009

i did as instructed, including to set chart to receive tick_volume, but ... no joy


#
#---
# tick_volume_Inc_Change      Increase of tick_volume relative to previous bar.
#                        natural range of this value: 0% - 100%
#
# tick_volume_Dec_Change      Decrease of tick_volume relative to previous bar.
#                        natural range of this value: 0% - 100%
#---

input: tick_volume_Inc_Change(10), tick_volume_Dec_Change(10), BarThickness(1), GreenColor(lime), FadeColor(maroon), FakeColor(yellow), SquatColor(red);

mfi = mfi();

if(barnum < barsback + 1)
    return;

volinc = tick_volume[1] * (1 + tick_volume_Inc_Change / 100);
voldec = tick_volume[1] * (1 - tick_volume_Dec_Change / 100);

# green
if(GreenColor != black and tick_volume > volinc and mfi > mfi[1]) {
    colorbar(barnum, GreenColor, BarThickness);
}

# fade
if(FadeColor != black and tick_volume < voldec and mfi < mfi[1]) {
    colorbar(barnum, FadeColor, BarThickness);
}

# fake
if(FakeColor != black and tick_volume < voldec and mfi > mfi[1]) {
    colorbar(barnum, FakeColor, BarThickness);
}

# squat
if(SquatColor != black and tick_volume > volinc and mfi < mfi[1]) {
    colorbar(barnum, SquatColor, BarThickness);
}                                                               

Love runs the Multiverse

Revisions : 0   |    Posted:  3/3/2010 12:12:35 PM    |    IP:  Recorded    |    Report this post
P: 3/3/2010 1:18:38 PM
earik

Administrator

Total Posts: 2,489
Last Post: 9/3/2010
Member Since: 11/6/2003

Hi Andy,

What about in the MFI function, called at the top? You may need to do it there too...

Earik

Revisions : 0   |    Posted:  3/3/2010 1:18:38 PM    |    IP:  Recorded    |    Report this post
P: 3/3/2010 3:53:29 PM
swamp yankee

Member

Total Posts: 26
Last Post: 3/7/2010
Member Since: 12/28/2009

No clue Earik, I am in waaay over my head.

I tried this
mfi = mfi_tick_volume(); 
and this
mfi = tick_volume_mfi(); 
being careful to build script and to delete from chart and reload into chart ... just in case

not to worry i dont have a long list of indicators to fiddle with but i would like to have this one sorted.

Respectfully,

Andy

Love runs the Multiverse

Revisions : 0   |    Posted:  3/3/2010 3:53:29 PM    |    IP:  Recorded    |    Report this post
P: 3/4/2010 6:30:44 AM
swamp yankee

Member

Total Posts: 26
Last Post: 3/7/2010
Member Since: 12/28/2009

Ok 150 views and only the busiest guy on the planet chips in. Not complaining just reporting facts.

The links from the script page "appear" to be broken so that a n00b can't get to any background info easily.  I'll keep stabbing around in the dark till I hear some screaming. ; )


ok I just figured out how to get from the qscript library to the thread on the BB.

the url includes session data which effectively breaks the link ; )

so pasting the  id  such as http://www.wave59.com/idealbb/view.asp?topicID=2236
is necessitated perhaps now I can get to the appropriate thread and make some head way!

Cheers!

Love runs the Multiverse

Revisions : 0   |    Posted:  3/4/2010 6:30:44 AM    |    IP:  Recorded    |    Report this post
P: 3/6/2010 5:52:11 PM
swamp yankee

Member

Total Posts: 26
Last Post: 3/7/2010
Member Since: 12/28/2009

"You have to suffer if you want to sing the blues." << David Bromberg

Ok Earik I had to sleep on it and take a fresh stab.  "mf function" meant nothing to me a few days ago, but the old 50 watt bulb flickered today and i understood that the function is a separate deal. I made some progress today.

I'll keep plugging.

Love runs the Multiverse

Revisions : 0   |    Posted:  3/6/2010 5:52:11 PM    |    IP:  Recorded    |    Report this post
P: 3/7/2010 5:49:12 AM
midnite

Member

Total Posts: 83
Last Post: 8/15/2010
Member Since: 2/4/2009

Andy,
You said you made progress, but you may still find this explanation helpful.

The mfi function Earik referenced is located on line 79 of Feierabend's "BillWilliam_Profitunity" (bwp) script.

mfi = mfi();

The value of the mfi variable is being calculated outside the bwp script by the mfi function.

Just as Feierabend built the bwp indicator with open code, the mfi function is also open code. You can open and edit the function in QScript Editor. Select Open Script (ctrl-o); select the Functions tab inside the Open QScript window. Scroll down the function list and you will find mfi.

/idealbb/files/QscriptEditor_mfi_function1.gif

As Earik advised, the mfi function needs the same volume to tick_volume edit as bwp. Line 32 becomes:

if (tick_volume > 0) val = (h - l) / tick_volume;

If you would like to preserve the original mfi function, you may wish to give the tick_volume version a name of its own (change in Script Properties). This would be my choice, and I would likely name it, mfi_tv. Doing so will require some follow-up edits on lines 29, 31, 33, and 35, substituting "mfi_tv" in place of "mfi".

Check Properties to be sure Function is selected as the Type of script to be created. Then build the script as you normally do.

If you choose to give the tick_version a new name, go back to the bwp script and edit line 79. With the mfi_tv example, the edit is:

mfi = mfi_tv();

Respectfully,
midnite

View Revisions : 5   |    Posted:  3/7/2010 5:49:12 AM    |    IP:  Recorded    |    Report this post
P: 3/7/2010 9:06:11 AM
swamp yankee

Member

Total Posts: 26
Last Post: 3/7/2010
Member Since: 12/28/2009

Thanks midnite! I took the hint and used a different label for the tick_volume mfi. I am really thankful you were precise about what to do on line 79, because truthfully I would have tried it just backwards if left to my own.

Thanks!

Good Trading!

Love runs the Multiverse

Revisions : 0   |    Posted:  3/7/2010 9:06:11 AM    |    IP:  Recorded    |    Report this post

 Previous Page
Next Page 

Jump to:



Contact Us  |  Back Home  |  Privacy Statement

Ideal BB Version: 0.1.5.4bMessage forum software powered by  the Ideal BB