| New signals service! | |
|
|||||||
| 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 (4) | Thread Tools | Display Modes |
|
||||
|
hi, I just noticed the indicator EMA_Prediction.mq4 contains a serious bug.
I spent all day yesterday marking my nice chart with vertical lines so that I would know when something important occured. I put this indicator on and then took it off the chart... bad idea... all my lines are gone... I know it's my fault for not looking at the code before running but just in case there are some others who don't proof-read before running, I thought I'd give you the heads up. So just to recap... EMA_Prediction.mq4 will delete all your Vertical Lines on the chart when you remove it or whenever else metatrader calls the deinit() function my suggestion to the author would be to incorporate code similar to this: Code:
// will delete all objects that contain aID_Prefix
void deleteObjects(string aID_Prefix) {
int nObjects = ObjectsTotal();
for (int i=nObjects; i>=0; i--) {
string objName = ObjectName(i);
if(StringFind(objName, aID_Prefix, 0) >= 0)
ObjectDelete(objName);
}
}
[DISCLAIMER: use this code at your own risk. I am not responsible for any code I create. However, it seems to work for me so far just fine. Just be aware if you are too lenient with the aID_Prefix it will delete alot of objects... e.g. aIDPrefix="a" would delete all those CONTAINING "a". If you want to only delete those starting with "a" then I would suggest changing the StringFind's >=0 to just 0. Although I have not tested that modification, it should work] Last edited by ycomp; 02-19-2006 at 04:08 AM. |
|
||||
|
Quote:
Could you please address this? I think Shadow is correct. At first I thought that maybe it had something to do with your loop counting Down To 0 instead of Up From 0, but either way, I believe it should still be +1. (Been trying for an hour to get my head around this) Also, you seem to use "pos-1" to position the arrows Forward 1 bar, so I'm not sure how "pos-1" can also be used to reference the Previous bar in the MA. If the PreviousEMA calculations are truly supposed to be "pos+1", then the 2 IF statements used to generate the signals can never be true. I know I'm nowhere near the coder you are, so please correct me if I/we are wrong. Also, if your code is correct, could you please try to explain why/how it works as I don't understand. Thanks, Keris |
|
||||
|
Please do not use this indicator with a real account until CodersGuru (or some other knowledgeable coder) responds to my post above. I still do not believe it is calculating things properly. See post #13 above.
Keris Note: If it turns out that the indicator does calculate properly, I'll delete my posts so as to not clutter up the thread. |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/ema-cross/1062-market-prediction-ema-cross-1-2-a.html
|
||||
| Posted By | For | Type | Date | |
| Un sistem de la A la Z... impreuna - vamist.com - Forex forums and blogs | This thread | Refback | 01-29-2008 07:49 AM | |
| Un sistem de la A la Z... impreuna - vamist.com - Forex forums and blogs | This thread | Refback | 12-31-2007 05:04 AM | |
| Un sistem de la A la Z... impreuna - vamist.com Forex Forum | This thread | Refback | 10-09-2007 05:39 AM | |
| Un sistem de la A la Z... impreuna | This thread | Refback | 06-28-2007 12:19 PM | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| The TrendStuffer System - easy trend prediction for everyone! | SirKhan | Commercial Trading Systems and indicators | 772 | 08-26-2008 01:16 PM |
| MA cross/Price cross MA EA | Pipsta_UK | Expert Advisors - Metatrader 4 | 5 | 05-10-2007 08:50 PM |
| When Does Market Open? | mikejody | General Discussion | 2 | 01-01-2007 06:20 PM |