|
|||||||
| 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 |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
won't show
Hi Guru!
First, thank you so much for all your FREE help!!! Second, I seem to be having difficulty with the indicator. I cut and pasted the code directly into Meta Trader and it it isn't quite working. If you don't mind, I've attached a picture of what I'm seeing. Perhaps you might know why? Agent2005 |
|
||||
|
Quote:
Thanks for your kind words! 1- Did you play around the options: Fixed Minimum & Fixed Maximum in the indicator property window? The image you sent shows Min -900000 & Max 900000 2- Could I see the code you cut-pasted, why don't you download the indicator and compile it instead od cut-paste? |
|
|||
|
I have a questions.
It was difficult for me to understand the logic but seems I got it. 1. int Counted_bars = IndicatorCounted (); if (counted_bars > 0) counted_bars --; It means that indicator is counting all the bars which was appeared on the chart. counted_bars-- is minus 1 every time. So, it should be started from some maximum value. Why it is counting like -- and not ++ (starting from zero and counted_bars ++? 2. if indicator is not counting the bars starting from zero we have pos = 0 in the beginning. Right? int pos = Bars - counted_bars; Because number of counted_bars is subtracted from the total numbers of the bar in the chart. And if counted_bar is started from zero, everything is ok. But counted_bars could not be started from zero because: int Counted_bars = IndicatorCounted (); if (counted_bars > 0) counted_bars --; So, I do not understand something. May you explain? 3. What to write in the code if it is necessary for indicator to count already specified number of bars, 300 for example? |
|
||||
|
Quote:
|
|
|||
|
It should be started from zero as I understand. Or from 1.
But according to this suggestion it is not started from zero, it was started from something, or from some max value may be: if (counted_bars > 0) counted_bars --; As Codersguru described before "pos" is the number of time for the loop to work. Because: int pos = Bars - counted_bars; It means if counted_bars is equal to the total number of Bars in the charts the loop will be finished. So, counted_bars should be started from some miminum and finished with some maximum. May be I do not understand something. |
|
||||
|
Quote:
Appendix 1 - BARS |
|
|||
|
Further Lessons
Coders Guru,
This is a very good course, thank you very much. I never would have figured out all the information you have told us on my own. Aside from checking back here every few days, how can I know when the next lesson is posted? Also, do you know how many lessons you intend to create? Thanks, Barry |
|
|||
|
Codesgure,
firstly I'd like to congratulate you for a job well done. Since you are asking for feeback, I'd like to raise one. on your lesson 12, you defined the following: double Volume[] This function returns a double type value holds the average of the total amount of currency traded within a period of time, usually one day. For example: Volume [0] will return this average for the current bar. I'm not too sure if this is correct. Volume[0] normally means the first tick of the new bar. It's basically the first quote (or tick) at the beginning of new bar. For example, on an hourly chart, it's the first tick for the new hour. I also thought initially that Volume is the quantity traded for the day (if it's a day chart); but it's nothing to do with that. Cheers! |
|
||||
|
Quote:
Try this code (in any time frame) and tell me what did you get: PHP Code:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lesson 9 - Preprocessors | codersguru | Lessons | 7 | 05-18-2006 08:26 PM |
| Lesson 17 - Your First Script | codersguru | Metatrader 4 mql 4 - Development course | 0 | 01-04-2006 11:37 PM |
| Lesson 11 - Your First Indicator (Part2) | codersguru | Lessons | 8 | 12-30-2005 02:20 PM |
| Lesson 2 - SYNTAX | codersguru | Lessons | 7 | 12-18-2005 12:57 PM |
| Lesson 10 - Your First Indicator (Part1) | codersguru | Lessons | 1 | 11-08-2005 11:17 PM |