You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
attach the expert to a message or give me a link to the one you have so i can dload it
Here it is.
Thanks for looking at it! I test it on the 5 minute graphs. It is designed for the 1 Hour graphs with different MinDistCross value (7). P.S. The alert function is at the very bottom of the coding!
LowPhat, the alert display is sort of working. I will keep testing it.
When I compiled the program which updates the graphs, the graphs must have taken a very long time to update. There is hope yet. If you can, check over the start and stop function. I went in the dictionary and nothing relates to the variable statements he uses, and none of the statements are used in the rest of the program - This confuses me. I would think UseHourTrade, StartHour and EndHour would be defined in the Meta-editor dictionary - It is not. So what phrase or statement would be turning on or shutting off the program??
Dave
<<
LowPhat, alert display now working exactly as I want it. I am still concerned about shutting the program on and off at various hours since the variables and statements are not used in the rest of the program except to display a comment "Non Trading Hours", and they are not defined variables or statements in the Meta-Editor dictionary. It seems to me he lacked the knowledge or coding to finish the function. I could be wrong??
Dave 77
if UseHourTrade is set to true in properties it will trigger the hours code
if(!(Hour()>=StartHour && Hour()<=EndHour))
if hour is NOT more or exactly StartHour or less than EndHour then dont execute anymore code. and starthour and endhour= whatever numbers you put in properties. so its just shutting off the code if the hours are not between StartHour-Endhour and the rest of the trading code follows so nothing should get executed. It looks fine to me but if your worried run a backtest with the settings you want and see if it executes a buy or sell in the hours you tell it not to.
Lowphat teh l337 n00beh Hax0rzz
I see now how this works. I was wondering what was going to stop the code execution - Dah!! This has been a good night of progress. I have 2 issues to fix and this EA will be fully up and running.
1) On the alert display. I will need to have the new alert statement to include a conditional statement for when the program actually places a trade. I think it has to do with if(ordertype==OP_BUY) or something like that. Presently, false crossovers will trigger the alerts also.
New Revised Coding As Of Tonight:
if(type=="UP") Alert (Symbol()," - ", "Moving Average Cross UP !");
if(type=="DOWN") Alert (Symbol()," - ", "Moving Average Cross DOWN !");
2) How to Link another indicator, like the momentum(14) indicator value to the logic as a condition to place a trade.
If I can get these two issues resolved, I believe this will be a very powerful money making EA.
If you would care to help me in this endeavor, I would appreciate it, plus, you will end up having a very powerful EA.
Dave
<
LowPhat, I think I resolved issue #1. By switching out if(type=="UP") with if(type=="Buy") it will alert me to when an actual trade takes place that has been filtered for false crossovers - This is more important than if a crossover has taken place, since there are many false crossovers. Testing will tell if I am right or not.
Then onto issue #2 - Indicator filter. Time to shut down for the night. Thanks again!
Dave
<<