molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Sun Apr 28, 2024 10:27 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: building custom indicator to show a different TF
PostPosted: Fri Nov 30, 2012 12:53 pm 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
Okay, I am going to have to think about this for a bit.....

_________________
Building a future with automated trading


Top
 Profile  
 
 Post subject: Re: building custom indicator to show a different TF
PostPosted: Fri Nov 30, 2012 1:00 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
AlGer wrote:
On a 1 hour chart... it would give me 24 different positiions of the LWMA 3 (close) (based on daily values)...


#1 hit for "mql4 interpolated mtf ma" on Google:
http://www.forexfactory.com/showthread.php?t=37965

Come on, I can see you aren't afraid of typing. :lol:

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
 Post subject: Re: building custom indicator to show a different TF
PostPosted: Sat Dec 01, 2012 11:49 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Alger, tale into account that daily amounts may not show up in lower time frames. The indicator does work but you do not see the value - the issue is a scale problem.
The lower time frames show a scale close to the prices in that chart. If the low/high of the previous day is too different/far from the current price you won't see it. You may see it if you zoom out the chart.


Top
 Profile  
 
 Post subject: Re: building custom indicator to show a different TF
PostPosted: Sun Dec 02, 2012 10:33 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
molanisfx wrote:
Alger, tale into account that daily amounts may not show up in lower time frames. The indicator does work but you do not see the value - the issue is a scale problem.
The lower time frames show a scale close to the prices in that chart. If the low/high of the previous day is too different/far from the current price you won't see it. You may see it if you zoom out the chart.


If I remember correctly (it's been a while since I built an MTF indi in TIB), TIB code modified in this fashion produces a real true-to-form MTF indi. By this, I mean an H4 indi loaded onto an H1 chart will print a bar every 4 price bars in the indicator window. Swtich the chart TF to H4 and it doesn't change shape at all--it simply prints a bar every price bar. I don't even know what to call these--straight MTF???

Then there are the stepped MTF indi's. These are useful for chart window displays because the step simply shortens or lengthens--depending on whether the user lengthens or shortens the chart TF, respectively. Continuing the H1 chart example, an H4 stepped indi would print a horizontal line 4 price bars long, and then step up to the next 4 bar horizontal line.

Then there are the interpolated indi's, also useful for chart window displays. These make more use of arrays (not IndexBuffers), and EMPTY_VALUES than I can understand. So, I don't find them too useful with SB. Continuing the same scenario, a diagonal line is printed... and reprinted... and reprinted until it's 4 bars long, and then it's fixed, and the reprinting starts again for the next 4 bars.

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
 Post subject: Re: building custom indicator to show a different TF
PostPosted: Mon Dec 03, 2012 11:59 pm 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
RJo wrote:
AlGer wrote:
On a 1 hour chart... it would give me 24 different positiions of the LWMA 3 (close) (based on daily values)...


#1 hit for "mql4 interpolated mtf ma" on Google:
http://www.forexfactory.com/showthread.php?t=37965

Come on, I can see you aren't afraid of typing. :lol:


Hi RJO

I downloaded two from that page...they are pretty cool. I like the interpolation one best.. it seems to make a good try at elimating whipsaws, although it is several candles in the past.... which doesn't help me!!!!! The other one I downloaded the other day, puts a flat bar right up to the current candle in the lower time frame so you can take your signal off of that. But, still all very interesting! Thanks.

_________________
Building a future with automated trading


Top
 Profile  
 
 Post subject: Re: building custom indicator to show a different TF
PostPosted: Tue Dec 04, 2012 12:08 am 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
molanisfx wrote:
Alger, tale into account that daily amounts may not show up in lower time frames. The indicator does work but you do not see the value - the issue is a scale problem.
The lower time frames show a scale close to the prices in that chart. If the low/high of the previous day is too different/far from the current price you won't see it. You may see it if you zoom out the chart.


Hi Molanis

No, its not a scale problem. My broker is Oanda, so maybe its their downloaded version of MT4. Or maybe something in my computer, but i doubt it. In the lower time frame, normally a person can view a higher time frame indicator -- it just shows as a flat bar -- or as RJO says, "stepped" The one I made from Molanis, is not "stepped" and doesn't calculate properly the adjustment for the lower time frame. For example when I am viewing the daily TF values in the 4 hour chart, the indicator still puts in the daily values -- one per candle -- as if it is still in the daily chart. The reason I can't see it on the chart at all time is because it is displaying the wrong values for all the candles in a lower time frame.

But if that one shows right on your computer, that is strange. An adaptive one I got from another forum the other day doesn't show in my 4 hour time frame but it does in all the other TFs. He said it shows on all time frames on his computer, so again I've got something strange going on with my version of MT4. Maybe I will just download a new version....

_________________
Building a future with automated trading


Last edited by AlGer on Tue Dec 04, 2012 12:16 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: building custom indicator to show a different TF
PostPosted: Tue Dec 04, 2012 12:15 am 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
RJo wrote:
molanisfx wrote:
Alger, tale into account that daily amounts may not show up in lower time frames. The indicator does work but you do not see the value - the issue is a scale problem.
The lower time frames show a scale close to the prices in that chart. If the low/high of the previous day is too different/far from the current price you won't see it. You may see it if you zoom out the chart.


If I remember correctly (it's been a while since I built an MTF indi in TIB), TIB code modified in this fashion produces a real true-to-form MTF indi. By this, I mean an H4 indi loaded onto an H1 chart will print a bar every 4 price bars in the indicator window. Swtich the chart TF to H4 and it doesn't change shape at all--it simply prints a bar every price bar. I don't even know what to call these--straight MTF???


I don't quite know what you mean by this, but I followed Molanis instructions exactly and it didn't display right in the chart window or a seperate indicator window. This quirk along with the one where that one adaptive ma didn't show right in my 4 hour time frame shows me there is a quirk hiding in my computer somewhere. anyway,, not to worry.. I have others programmed that seem to be working fine.....

_________________
Building a future with automated trading


Top
 Profile  
 
 Post subject: Heres my snapshot to show you
PostPosted: Wed Dec 05, 2012 9:26 pm 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
Hi Molanis,

Here is my snapshot to show you how it shows up in my computer. I followed your instructions exactly, but I first tried simply importing a moving average from my brokers file (instead of a custom indicator that I created in Molanis), and it turned out to display exactly the same way as the other way using your exact instructions:

Program actually displays the last chart first, so please look at the last chart and comments first, then the middle one, then the first one. and you will see what i mean when you compare it that way. The chart comments appear in very small writing for some reason:


Attachments:
File comment: Here it is in the chart window. notice how it is going all over the damn place? and it is not stepped. The reason for that is that the program is trying to show dialy indicator values for each 4 hour candle INSTEAD of every sixth candle, as MTF indicators normally do.
Euro 4 hour MTF LWMA 3 IN THE CHART WINDOW.PNG
Euro 4 hour MTF LWMA 3 IN THE CHART WINDOW.PNG [ 107.49 KiB | Viewed 6283 times ]
File comment: Here is the same MTF, switched to 4 hour TF. Notice how the indicator display is exatly the same? Right. It displays the daily values in a 4 hour chart. If I chose "in the chart window" option, it would still display daily values on the chart and soon it would be all over the place and off the chart window (not because of a price scale problem, but because the indicator is showing the wrong values for the that time frame).
Euro 4 hour MTF LWMA 3.PNG
Euro 4 hour MTF LWMA 3.PNG [ 97.17 KiB | Viewed 6259 times ]
File comment: Here is the MTF indicator in Daily TF, and it shows corrrectly.
Euro Daily MTF LWMA 3.PNG
Euro Daily MTF LWMA 3.PNG [ 98.68 KiB | Viewed 6280 times ]

_________________
Building a future with automated trading
Top
 Profile  
 
 Post subject: Re: building custom indicator to show a different TF
PostPosted: Thu Dec 06, 2012 11:14 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Please post your .mol files and a description of each indicator


Top
 Profile  
 
 Post subject: Re: building custom indicator to show a different TF
PostPosted: Thu Dec 06, 2012 10:44 pm 
Offline

Joined: Fri Feb 04, 2011 9:48 pm
Posts: 114
Location: Canada
Here is the first one: It is the MTF LWMA 3, which shows in a seperate window. I want it to show daily values in other TFs

Attachment:
#MTF LWMA 3.moi [2.28 KiB]
Downloaded 551 times


Here is the second one MTF LWMA 3 which shows in the chart window:

Attachment:
#MTF LWMA 3 CHART WINDOW.moi [2.28 KiB]
Downloaded 543 times


Both have the same issue.

_________________
Building a future with automated trading


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 30 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009