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 May 19, 2024 2:01 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Indicator incorrectly draws arrow on every bar
PostPosted: Mon May 16, 2011 10:27 pm 
Offline

Joined: Mon May 02, 2011 10:56 am
Posts: 5
Want indicator to show arrow when ATR > x or ATR < x.

I'm simply trying to learn so I picked an MT4 default indictaor - Average True Range - and tried to create something that will place an arrow on it when it goes below a certain level. Tried to set a checkmark when ATR(5) < .0002 and got the attached pic. Here's the TIB calc: iATR(NULL,0,5,i)<0.0002. Tried numbers between low of .0001 and high of .001 and all have the same look. ATR only draws 1 line so I'm sure that mode=0 is correct. But that's all I'm sure of! Every new candle has a checkmark on it, either at the top or bottom of the separate window.

Another problem is this: the "separate window" range (below the chart) changes when changing timeframes so once I get it running I guess I'd have to create an indicator for each timeframe?

Help, and Thanks!

~D~
==============
Here's the mol code:
<?xml version="1.0" encoding="UTF-8"?><molanis><root><myCell id="0"/><myCell id="1" parent="0"/><myCell id="2" parent="1" style="roundImage;image=/com/mygraph/swing/examples/images/STARTbig.gif" vertex="1"><basicBlock as="value" code=" this is the code for start " description="Location=In a separate window" label="In a separate window" name="START" template="start.ftl" type="START"><Date as="expireDate"/><Array as="variables"><add as="Show Indicator" value="In a separate window"/></Array></basicBlock><myGeometry as="geometry" height="80.0" width="80.0" x="380.0" y="20.0"/></myCell><myCell id="4" parent="1" style="roundImage;image=/com/mygraph/swing/examples/images/myTI.gif" vertex="1"><basicBlock as="value" code=" this is the code for INDICATOR " description="Calculation=iATR(NULL,0,5,i)&amp;#0600.0002" label="Orange - DRAW_ARROW" name="INDICATOR" template="INDICATOR.ftl" type="INDICATOR"><Date as="expireDate"/><Array as="variables"><add as="Advanced Period" value="0"/><add as="Bottom Scaling Limit" value="-100.0"/><add as="Advanced Formula" value="None"/><add as="Indicator Width" value="2"/><add as="Calculation" value="iATR(NULL,0,5,i)&lt;0.0002"/><add as="Indicator Style" value="DRAW_ARROW"/><add as="Indicator Color" value="Brown"/><add as="Top Scaling Limit" value="100.0"/><add as="Line Type" value="STYLE_SOLID"/><add as="Arrow Symbol" value="SYMBOL_CHECKSIGN"/></Array></basicBlock><myGeometry as="geometry" height="60.0" width="60.0" x="370.0" y="180.0"/></myCell></root></molanis>


Attachments:
ATRisLow.jpg
ATRisLow.jpg [ 97.6 KiB | Viewed 4801 times ]


Last edited by pipseer on Tue May 17, 2011 10:07 am, edited 1 time in total.
Top
 Profile  
 
 Post subject: Re: Indicator incorrectly draws arrow on every bar
PostPosted: Tue May 17, 2011 9:19 am 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Next time please upload your .moi file
The current version does not manage conditions like iATR(NULL,0,5,i)<0.0002. The indicator calculation is an expressions that returns a value (the result of a calculation) like iATR(NULL,0,5,i)*0.9+Close[i]
The initial idea was that people create the indicator in the strategy builder and then they apply the conditions in the strategy builder. So you can create an indicator equal to iATR(NULL,0,5,i) and then in the strategy builder, you will compare it to 0.0002
However we have lots of requests to include conditions in the indicator builder which we will do in the next release (6 months from now)


Top
 Profile  
 
 Post subject: Re: Indicator incorrectly draws arrow on every bar
PostPosted: Tue May 17, 2011 11:16 am 
Offline

Joined: Mon May 02, 2011 10:56 am
Posts: 5
molanisfx wrote:
Next time please upload your .moi file
The current version does not manage conditions like iATR(NULL,0,5,i)<0.0002. The indicator calculation is an expressions that returns a value (the result of a calculation) like iATR(NULL,0,5,i)*0.9+Close[i]
The initial idea was that people create the indicator in the strategy builder and then they apply the conditions in the strategy builder. So you can create an indicator equal to iATR(NULL,0,5,i) and then in the strategy builder, you will compare it to 0.0002


Ahhhsooo. My take on MT4 EAs vs MT4 Indicators is that indicators report the results of comparisons, can draw conclusions, and report info and EAs can do all of that but can also take action on that information. But my take on Molanis EAs vs Molanis Indicators is that TIB indicators can only draw/present and then the SB EA uses that info to calculate results that can lead to the EA taking action. Thanks.

Quote:
However we have lots of requests to include conditions in the indicator builder which we will do in the next release (6 months from now)


So does this mean that TIB will now create indicators that more closely resemble MT4-style indicators that can draw conclusions, make comparisions, and report on those results? Hope so.

Does it follow that if the only output of an MT4-created indicator was text printed to the screen, TIB can also create an indicator capable of doing that? I bet you're gonna say something like this: "yes, but that will take an understanding of MT4 code...."

Thanks for the quick reply and clarity.

~D~


Top
 Profile  
 
 Post subject: Re: Indicator incorrectly draws arrow on every bar
PostPosted: Tue May 17, 2011 12:53 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
I cannot tell you all the features that will be included in the next release. We have not defined them yet. For sure you will be able to create conditions.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

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