Forex
Google
New signals service!

Go Back   Forex Trading > Metatrader Training > Metatrader 4 mql 4 - Development course > Questions


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 06-15-2008, 02:45 AM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 802
TheRumpledOne is an unknown quantity at this point
Thanks for sharing Big Be.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 06-15-2008, 10:17 AM
IN10TION's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 569
Blog Entries: 1
IN10TION is on a distinguished road
I adjust some little things, not so important
let your MACD Sample run in your tester, pauze the visual mode, and put your indicator on the testing chart, let it run again...


Quote:
Originally Posted by TheRumpledOne View Post
WHAT'S WRONG WITH THIS PICTURE?

What don't I understand?

What did I do wrong or not do right?

Limit is always 68922.

So the for loop is running 68923 times each and every time?

Or is it because the market is closed this isn't working "right"?

Please shed some light on this.

Thanks.

NOTE: I am NOT trying to prove anyone wrong. I am trying to learn and understand.
Attached Files
File Type: mq4 _TRO_Limit_test.mq4 (2.5 KB, 9 views)
__________________
..4.Nov.08.. IN10TION newsReader v09.85 Lite - the best news reader on your chart
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 06-15-2008, 10:33 AM
IN10TION's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 569
Blog Entries: 1
IN10TION is on a distinguished road
Well it's true! IndicatorCounted() doesn't work like that, therefor it is a tool not a solution... but still you have to use it, it is necessary! It limits and shorten your loops. If you need previous bars other easier options are available. This article could be written much easier to understand, even the coding could be more simplified, the article is almost 2 years old, probably an over enthusiastic professional coder wanted to make a point

Quote:
Originally Posted by Big Be View Post
Some indicators make coding a lot more difficult. They operate on the last value (previous bar) to create the new value. Then IndicatorCounted() does not work!

This article tells you how to fix that. When I first read it, I thought, "I will have to read this six times before I can use it successfully." Fortunately I was wrong - it only took me four times. Plus some "trial and error."

The results: It sped up the backtesting by about 100 times, as it no longer recalculated every bar for the complicated indicator, for every tick. This obviously will speed up live execution the same.

Enjoy!

Multiple Null Bar Re-Count in Some Indicators - MQL4 Articles

Big Be
__________________
..4.Nov.08.. IN10TION newsReader v09.85 Lite - the best news reader on your chart
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 06-15-2008, 05:25 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 802
TheRumpledOne is an unknown quantity at this point
Quote:
Originally Posted by IN10TION View Post
Well it's true! IndicatorCounted() doesn't work like that, therefor it is a tool not a solution... but still you have to use it, it is necessary! It limits and shorten your loops. If you need previous bars other easier options are available. This article could be written much easier to understand, even the coding could be more simplified, the article is almost 2 years old, probably an over enthusiastic professional coder wanted to make a point
Thanks again, IN10TION.

One small favor, whenever you update someone else's code, please change the name in some way so the ORIGINAL code doesn't get stepped on. Just one of those coding conventions/standards.

To make my life easier, I have a version of the indicator, called IND000. That is the PRODUCTION VERSION and is used by the template.

The ORIGINAL indicator would be named IND.

The next version would be IND001. After I get IND001 debugged and tested, I then copy it into IND000 and compile it. I don't have to change the template.

If I ever need to go back to an earlier version, I just copy that version into IND000 and compile it.

This keeps things running smoothly.

Thanks again for adding to the discussion.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 06-15-2008, 05:33 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 802
TheRumpledOne is an unknown quantity at this point
IN10TION:

Question: What is the reason you used

SetLevelValue(0,1);
SetLevelValue(1,2);
SetLevelValue(2,3);


instead of


#property indicator_level1 1.0
#property indicator_level2 2.0
#property indicator_level3 3.0


??


Just curious.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 06-15-2008, 07:04 PM
Member
 
Join Date: Oct 2006
Posts: 71
Big Be is on a distinguished road
When IndicatorCounted() Will Not Work, comment

Quote:
Originally Posted by IN10TION View Post
If you need previous bars other easier options are available. This article could be written much easier to understand, even the coding could be more simplified, the article is almost 2 years old, probably an over enthusiastic professional coder wanted to make a point
Yes. It could be much better, but it would have to be written by one who really understands that subject, and can communicate clearly.

Any volunteers?

Big Be
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 06-15-2008, 07:28 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 802
TheRumpledOne is an unknown quantity at this point
Looks like we will figure this out together
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 06-15-2008, 08:07 PM
IN10TION's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 569
Blog Entries: 1
IN10TION is on a distinguished road
please show a code of the issue you dealing with... it will make it simpler to illustrate... otherwise don't trouble yourself with something that is seldom needed.

Did you try with the tester? ( _TRO_Limit_test.mq4 )

no reason between those, only setlevelvalue can overpower a property indicator_level.
SetLevelValue(2,3);
or
#property indicator_level1 1.0
__________________
..4.Nov.08.. IN10TION newsReader v09.85 Lite - the best news reader on your chart
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 06-15-2008, 09:06 PM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 802
TheRumpledOne is an unknown quantity at this point
Quote:
Originally Posted by IN10TION View Post
please show a code of the issue you dealing with... it will make it simpler to illustrate... otherwise don't trouble yourself with something that is seldom needed.

Did you try with the tester? ( _TRO_Limit_test.mq4 )

no reason between those, only setlevelvalue can overpower a property indicator_level.
SetLevelValue(2,3);
or
#property indicator_level1 1.0
Didn't run tester.. waiting for market to open and run live.

Thanks again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 06-16-2008, 03:14 AM
TheRumpledOne's Avatar
Banned
 
Join Date: Nov 2006
Posts: 802
TheRumpledOne is an unknown quantity at this point
RESULTS ARE IN:

limit_test.gif
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
THE BUY ZONE - TheRumpledOne TheRumpledOne Indicators - Metatrader 4 253 08-24-2008 04:02 PM
TheRumpledOne Indicators TheRumpledOne Commercial Trading Systems and indicators 163 07-23-2008 10:25 AM


All times are GMT. The time now is 06:24 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.