- Search Energy EXCH
- 214 Results (27 Threads, 187 Replies)
- asgard2 replied Aug 29, 2009
I could also point people to documentation that does not contain the answer.. So answer me this? Why doesn't the sleep command work in the code below? if(DropProtection !=0) { total = OrdersTotal(); for(i = total - 1; i >= 0; i--) { OrderSelect(i, ...
Five dollar programmer
- asgard2 replied Aug 29, 2009
That may be right but some of us try to do our homework and still get few here to answer. I have a "sleep question" simply if I can include a time variable inside the brackets instead of ms. Many people will know the answer but about two or three ...
Five dollar programmer
-
Five dollar programmer
Started Aug 29, 2009|Platform Tech|15 repliesYou know it is well worth learning how to program in MQL4. The problem is that if you are ...
- asgard2 replied Aug 29, 2009
At the risk of the blind leading the blind. I can't answer your question but I think you can do this. Give it a shot anyway, it might work. if(IsTradeAllowed() ==false) return(0); or if(IsTradeAllowed() ==true) return(0);
2 quick questions and hopefully simple answers
- asgard2 replied Aug 29, 2009
Can I use the sleep command like this? If not how would I make the EA sleep after the condition was met? if(DropProtection !=0) { total = OrdersTotal(); for(i = total - 1; i >= 0; i--) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if(OrderSymbol() ...
3 Programming Function meanings?
- asgard2 replied Aug 28, 2009
Great minds think alike.. I was going to do something like this. If trailing stop has not been set due to lack of move, then take profit before moving average period 14. I am still a beginner but I am about to start on this right now. Might save ...
First Profitable Close
- asgard2 replied Aug 28, 2009
I think it is a horses for courses thing.. I am just really stumped why that code deletes every order.
troublesome line of code
- asgard2 replied Aug 28, 2009
Well originally I had this code, which looks ok to me with my limited knowlege. This does the same thing. Its like it is paying no attention to the condition image if( StopResetMinutes > 0) { total = OrdersTotal(); for(i = total - 1; i >= 0; i--) ...
troublesome line of code
- asgard2 replied Aug 28, 2009
Hi, I am back to square 1 with this piece of code. Can anyone enlighten me why this code is deleting every buystop order? if (UseDeferOrderTimeout == 1) { if((TimeCurrent() - OrderOpenTime()) /60 >= StopResetMinutes) { if(OrderType() == OP_BUY) ...
troublesome line of code
- asgard2 replied Aug 27, 2009
LOL..yes, I did it again.. but I found the problem. I changed the i to e and it started to work. Before I had a global variable for i. like this if (MayOpenDeferOrder && Delay_Next_Order_Minutes !=0) int e=-1; //Time Delay for the next Order { total ...
troublesome line of code
- asgard2 replied Aug 27, 2009
I changed it. I think my head hurts... still no luck! No compile errors.. either.
troublesome line of code
- asgard2 replied Aug 27, 2009
Hi EC No, Delay_Next_Order_Minutes is just a variable. Since this is the first OrderSelect I have done (never want to do another
) I thought I must have something wrong there. I pasted in your code and it still hangs the chart and wont open any ...troublesome line of code
- asgard2 replied Aug 27, 2009
The Lastest problem — I wonder if anyone can tell me why this code prevents any orders and causes the visual backtest to freeze? I have been at this for hours now.. can not figure it out. if(MayOpenDeferOrder && (Delay_Next_Order_Minutes > 0)) ...
troublesome line of code
- asgard2 replied Aug 26, 2009
Hey, that looks like a good plan for a dynamic stoploss.. I will give it a try, so thanks for the code
EMA Close Crossing EMA High/Low Help Please!
- asgard2 replied Aug 26, 2009
Yep, I eventually worked it out. I sent him an mq.4 file not an .ex4, not sure why he would compile it and then de-compile it.. anyway I will ask him for just the piece of code I paid for to be pasted in and the original returned. Wow.. that sounds ...
Changing the way code looks
- asgard2 replied Aug 25, 2009
BTW, the code pasted here is not code that needed any changes. It is just a random selection to post here as a demonstration. The whole EA is like that.
Changing the way code looks
- asgard2 replied Aug 25, 2009
No, it is the same code and it has been run through some sort of program to change the code. It is not possible to re-write a 50 page EA in a few days exactly as it was before. I sent the EA to him nearly 2 weeks ago but he had not started on it ...
Changing the way code looks
- asgard2 replied Aug 25, 2009
Would this be a good solution for a stoploss/takeprofit instead of a trailing stop? I optimise on where to set my trailing stop and I have found that really there is no good answer. If the market is moving slowly, it should be closer that when it is ...
Adding Spike Protection
-
Changing the way code looks
Started Aug 25, 2009|Platform Tech|6 repliesHi all, I sent an EA to someone to put in a couple of lines of code. I now have it back but ...
- asgard2 replied Aug 25, 2009
Oh, sorry, I had that sorted out and I had moved on to the next problem.
I still have quite a few to sort out but I am getting there.troublesome line of code