- Search Forex Factory
- 1,159 Results (26 Threads, 1,133 Replies)
- ecTrade replied Sep 12, 2011
With respect to the code above, this is where I opted to put it (in a similar configuration). Thus far I haven't encountered any problems, so I assume it is correct. if(close_2) { for(i=OrdersTotal()-1; i>=0; i--) { ...
- ecTrade replied Sep 10, 2011
Hey, if I place the following code just prior to OrderSend() or, in the case above, OrderClose(), this is where it should be placed, correct? while(IsTradeContextBusy()) Sleep(100); RefreshRates();I've already been doing this with OrderSend() for ...
- ecTrade replied Aug 22, 2011
Yes, I agree, one tick is all it should take. Also, whenever I have to sort for the earliest order, I always go with OrderOpenTime(), which is what I did with the code above. I just thought maybe there was an easy way to specify it without creating ...
- ecTrade replied Aug 22, 2011
Hey, thanks, that gave me an idea ... void closeall() { while(total()>0) { int T=0; datetime FOOT; bool close_2=false; for(int i=0; i<=OrdersTotal(); i++) { OrderSelect(i,SELECT_BY_POS,MODE_TRADES); if(OrderSymbol()!=Symbol() || ...
- ecTrade replied Aug 21, 2011
Is there any way of telling the loop to repeat itself until all orders are closed, based upon the OrderOpenTime()? That, I think. would be ideal. for(int i=OrdersTotal()-1; i>=0; i--; T>0) { OrderSelect(i,SELECT_BY_POS,MODE_TRADES); ...
- ecTrade replied Aug 21, 2011
Yes, I can do that, but how many cycles (or ticks) will it take for this to happen? From what I understand, it only sorts the orders once so, if it's not in chronological order the first time, then it has to wait for the next cycle (or tick) in ...
- Code for Closing Orders Against FIFO
Okay, here's the deal. I have a block of orders I'd like to close all at once using a general ...
- ecTrade replied Aug 4, 2011
Okay guys, since the EA in post #525 is the basic EA (although "new" and improved), I think I may start a new thread in the next day or two, and maybe we could talk about some of the ideas in the last few posts? I don't see a point in doing it here ...
- ecTrade replied Mar 13, 2011
Actually, the power lots takes the ratio between the initial lots and initial balance (lots/equity) and maintains it throughout. Meaning, if you start out with a $500 deposit at 0.05 lots, by the time the balance reaches $1000, the lot size would ...
- ecTrade replied Mar 10, 2011
Power Lots Issue ... — Hey, I just noticed if you set power_lots to false it won't work. That's because power lots factor (pl_factor) needs to be set to 1 by default, which I wasn't calling out. And, since I am multiplying tp_in_money by this ...
- ecTrade replied Mar 9, 2011
Okay, that's fine. My questions were actually directed more towards freqzz, who really didn't say much, except there was an error? ...
- ecTrade replied Mar 9, 2011
Have you seen this? I think it might be more along the lines of what you're talking about.
- ecTrade replied Mar 9, 2011
So, did it work straight out of the box, so to speak? Like I said, it seemed to work fine when I was backesting it. While I just opened it up to forward test it and the journal said it was loaded successfully. Of course I also said to set ...
- ecTrade replied Mar 9, 2011
That could be a problem I guess, especially if you've modified it three or four times in the same post, unless of course it was the most recent update? It sounds like you've got it figured out anyway, so I think I'll just skip on it for now. Are you ...
- ecTrade replied Mar 9, 2011
So, which version were you using here anyway?
- ecTrade replied Mar 9, 2011
Yeah, it almost always does that, right at the start of the test. It usually keeps running after that though. Aside from that, I tend to get a lot of order modify errors but, it still doesn't keep the EA from functioning the way intended. It ...
- ecTrade replied Mar 9, 2011
Hey, thanks! Oh, he's using increments set at 0.3 instead of lot multiplier, so 1.5 lots sounds like it might be okay, although it still seems a bit high. I also noticed he had range multiplier set to 3.0, which will probably put you out of range ...
- ecTrade replied Mar 9, 2011
Okay, what folder are you supposed to save it into? And how do you load it afterwards?
- ecTrade replied Mar 8, 2011
Version 05_E / Hedge Fix ... — You're right. I created a special function just to calculate hedge lots but, I forgot to include the h_factor. Oh well, since I can no longer modify version 05_D, I guess we'll have to go with version 05_E. I ...
- ecTrade replied Mar 8, 2011
This is kind of like what the power lots setting is supposed to do. You decide what's an acceptable lot to account size risk initially, and it will increment everything based upon that ratio (lots/initial balance). So, if you started out with a ...