-1

I'm looking for a cross between

Money Flow Index: iMFI( Symbol(), 0, 2, 0 )

and

On Balance Volume: iOBV( Symbol(), 0, PRICE_CLOSE, 0 )

only

if ( iMFI  == 0  ||  iMFI == 100 )

please check the example:

iMFI and iOBV example

Here the .TPL template < aClickTHRU >

thanks for any idea

UPDATE:

crossing detail:

cross detail

cross detail 2

On Balance Volume: iOBV properties

iOBV properties

yhoyo
  • 177
  • 9
  • Would you be so kind and provide an **+PrintScreen** for a RightClick-opened properties dialogue panel for the iOBV() indicator line parameters / scaling? Enlarged views are not necessary as desktop browser allows to zoom-in ( was not the case on tablet view during my first response below ) – user3666197 May 01 '15 at 19:04
  • @user3666197 thanks for answer.. I update the post with data that you want.... thanks for all the support... I also read that the problem could be that the code takes the indicators in different windows; I keep looking for an answer too. – yhoyo May 01 '15 at 19:14
  • No, the notice on **"separate window"** is related to the common failure to notice a difference in finding crosses on auto-scaled lines ( for indicators, that present themselves in aPriceDOMAIN this trouble is not present ). As you can see in the indicator settings, the iOBV() has floating min/max settings, this is the problem to get a more detailed specification for positive-detections to get solved. – user3666197 May 01 '15 at 21:15
  • **Let's work a bit on this field.** From what I have seen on similar approaches, adding a sort of self-adapting filter may help to identify extreme points with non-flat, peak-value reversals beyond a near-past sliding-window extreme / treshold on iOBV() as the second condition for your **`DetectorPOLICY`** to be implemented. – user3666197 May 01 '15 at 21:20
  • As a matter of fact, once working with a non-PriceDOMAIN data alike the `iOBV()`, the MT4 graph shall better also depict the `Volume()` TimeSeries' data ( just add in a RightClick-opened Properties panel of the dark graph background and mark-on/off the `Volume` checkbox to get it displayed ) – user3666197 May 02 '15 at 09:45
  • @user3666197 are you talking about this http://prntscr.com/70n6h6 ??? – yhoyo May 02 '15 at 13:46
  • Yes, sir, exactly. It is wise to change a bit the colour settings for the Volume data to get displayed in bit more distinguishable colour than the green / lime ( which looks almost the same as the candles' Hi / Lo wicks and bullish candle body... ) and do not cause eye fatigue during extensive screen-hours. Some darker grades of gray may fit well on the darkness of the 100% Black background. – user3666197 May 02 '15 at 15:22

1 Answers1

0

A common base for all Cross-based strategies

MQL4 algorithmisations that work with Technical Indicators ( iOBV(), iMFI() et al ) in a separate window have to be also carefull about the independent Y-axis scaling-factors, these "lines" have.

Thus beware that saying lines cross or lines do not cross depends on "hidden" values of these coefficients ( sometimes fixed, sometimes adaptively modified in the background ).

A systematic problem with hot-[0]-end vs. all frozen-[1..] values

If you have already spent some time with MT4 MQL4-code-base, you have already both a feel & some common-sense practice, how to handle the dualism of [0]-candle close() value. There are many issues while working within the hot (current) end of the TimeSeries and there might be some additional efforts needed so as to filter-out many "false-Crosses" that happen "during" the hot-end evolution, but do not mean a positive-detection for the strategy, as these artefacts disappear and do not remain as visible Cross after the hot-candle gets frozen once it becomes a part of "history" as aNewBarEVENT passes and reversed-indices shift forwards.

A consistent & complete definition for a strategy algorithmisation

As depicted in your example, there are "almost-Cross-es", that are marked by a white circle + arrow, but there are also exactly analogous "almost-Cross-es", that are not marked.

There may be some reason for making a difference between these two groups.

MQL4 Robots ( a.k.a. EAs ) are very powerful beasts, working relentlessly 24/7/365, reacting to aMarketEVENT flow within a few nanoseconds, however they all remain as blind and deaf automatons, that do not see or feel what you have in mind once you "see" the lines on screen.

The EA simply does only what it has been pre-programmed to do.

So the precise description of what to do ( which also means what not to do ) is a key to the ExpertAdvisor automation of a success.

A best next step

Can you, please, specify ( rather in plain words than by a pseudo-syntax ) additional conditions, to clarify some other reasons, why some constellations were left without positive-detection markers?


How some Cross-based strategies' Projects may look like?

Without going into full details and risking a customer's NDA or intellectual rights infringement in general, let me show you a bit from a Cross-based Trading Strategy design, that was prepared, validated and developed under FSA/OOP methodology framework, to ensure both Backtesting also with a need to integrate MT4 Terminal/Strategy Tester with external computing grid and KBD-Terminal-IO controls.

sample of a Cross-based Trading Strategy Design Documentation

halfer
  • 19,824
  • 17
  • 99
  • 186
user3666197
  • 1
  • 6
  • 50
  • 92
  • thanks for your answer.. about the "almost-Cross-es", I update the post with a enlarged image that show the real Cross. I add the circles and the arrows manually. As you say the main problem is the iMFI fixed values vs iOBV adaptative values... the candle should close with the crossing, even though the new candle then move the crossing. thanks for any help – yhoyo May 01 '15 at 16:15
  • thanks for your additional information and interest in finding a working solution. – user3666197 May 01 '15 at 17:38