| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Coin-Flip EA v2.0 https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3765 |
Page 10 of 19 |
| Author: | acs [ Mon Aug 11, 2014 10:55 am ] |
| Post subject: | Coin-Flip EA v2.0 |
got error forward testing EAv26 Experts error log 10:54:43 CoinFlip EA V26R EURUSD,H1: initialized 11:00:00 CoinFlip EA V26R EURUSD,H1: trade operations not allowed by settings 11:00:00 CoinFlip EA V26R EURUSD,H1: OrderSend function error = 0 orders with the broker have to be sperate, they will not let you send order+SL+TP with one command you send order first and then modify order, at least I think that is what the problem is here. acs |
|
| Author: | xmess7 [ Mon Aug 11, 2014 12:30 pm ] |
| Post subject: | Coin-Flip EA v2.0 |
Question, what is the margin required for 27.46 lots? In order to find out. Go on Demo and try to buy or sell 1.0 lots, Once the trade is made look at Terminal window below the chart and find the value next to Margin. I ran into the same problem while testing a $10K demo. The problem is that when the SL gets smaller the lotsize gets bigger. The Lot size gets to a point where the margin required to open that size is more than the margin you have available. In your case 27.46 lots requires more margin than the $10K that is available. Is there a solution?? Well yes LOL. It depends on how you guys want to handle it. We can have the EA recognize this situation and then have it re-do the lot calculation until it finds the right lot size which will not require more margin than what you have available. Or the EA can decrease the PercentEquity or the EA can try the HARD_SL to calculate the lotsize.... anyway, we'll figure this out when we know for sure that it's a margin issue. Let me know.
|
|
| Author: | xmess7 [ Mon Aug 11, 2014 12:31 pm ] |
| Post subject: | Coin-Flip EA v2.0 |
Check that 'Allowed Trading' is active. I've seen this error before and it's because I forget to set the 'Allowed Trading' check boxes. J
|
|
| Author: | acs [ Mon Aug 11, 2014 1:18 pm ] |
| Post subject: | Coin-Flip EA v2.0 |
Hi Jess you were right I guess my brain was not in gear. acs |
|
| Author: | zhengzuodong [ Tue Aug 12, 2014 4:48 am ] |
| Post subject: | Coin-Flip EA v2.0 |
Hi, xmess7, thank you for your great work, salute you. About trading hours (TradeCandle = 2) problems may need to be adjusted. According to the original post:http://www.forexfactory.com/showthread. ... ost7614364 London opening: 9:00 (London time, GMT) 1st Candle 9: 00-10: 00 (We do not trade here, it's the breakout) 2st Candle 10: 00-11: 00 (At the beginning of the candle we close the trade of yesterday) At the end of the candle we open the new trade. Buy if the candle is bullish Sell if the candle is bearish 3th Candle 11: 00-12: 00 (Here we do nothing), in fact, it can be said that at the beginning of this candle, open transactions. So: EA program first 141-145 lines: Code: Select all EA program 152 line: Code: Select all Open orders And later conditions: LOTinBroker) + (TradeCandle + 1) = 12: 00, then open the transaction time is set to start in the 4th candle. These two issues inconsistent with the original post. If there is something wrong, please correct me. Trade luck. |
|
| Author: | xmess7 [ Tue Aug 12, 2014 8:29 am ] |
| Post subject: | Coin-Flip EA v2.0 |
Yep, I am right their with you brother! It took a little bit of thought to understand the original poster's idea. The main reason for adding the input TradeCandle was so users can set their own trading time, for example Spyderman is using the Asian session. So if u set the TradeCandle to 1 then the EA will perform according to the original post. With TradeCandle =1 then the following will close an Order when when LOTinBroker+TradeCandle (9+1) or 10th hour is reached. Code: Select all Code: Select all So it's just a matter of setting TradeCandle to 1. I could of set the TradeCandle to 1 as a default but thought that the trader would change it, so I left it alone. On the next version (2.7) I'll do that. All comments and questions are more than welcomed. IF you still need more info let me know. The next things to tackle are the following: 1. Detect when Lotsize is to large and adjust it until there is enuf margin to trade 2. Add a True/False flag that will allow the trader to only use HardSL and HardTP, no ATR nor yesterdays low. 3. Detect when there is an invalid SL and/or TP and fix it right away before modifying the order. Life is fun and busy on this side of the screen.... so I'll take a look at these during the weekend. (hmmm Today someone offered to help, lets see if we can get it going... ) Peace
|
|
| Author: | zhengzuodong [ Tue Aug 12, 2014 3:01 pm ] |
| Post subject: | Coin-Flip EA v2.0 |
Hi,Xmess7. Your explanation is right, but I think setting of the variable should be a relative position (eg, the offset of the behind London session open candle) In fact, I have the variable "TradeCandle" was renamed "TradeAfterOpenOffset", and still set it to 2. Means placed trade at the start of 2nd candle behind London (or other market) opened candle. Similarly, if you set it to 1, meaning that orders placed in 1st candle after the market open candle. This is more consistent with the original post ideas, also more intuitive, and does not confuse. Meanwhile, I will change the program as follows: Code: Select all Code: Select all thanks all trade happy |
|
| Author: | xmess7 [ Tue Aug 12, 2014 4:55 pm ] |
| Post subject: | Coin-Flip EA v2.0 |
zhengzuodong, from some of the testing, currently the EA will close a trade at the beginning of the TradeCandle (just as at the candle opens) and open a trade at the end of the TradeCandle (or right after it closes). This is what I saw and what I see on my forward testing. I called the variable TradeCandle cause in my thought that it was like, that was the Candle that the user wanted these things to happen. So we could rename it to TradeCandleAfterMarketOpen. I understand what you are saying, it's just that it comes down to making this the simplest as possible. We'll work on it...
|
|
| Author: | zhengzuodong [ Wed Aug 13, 2014 12:38 am ] |
| Post subject: | Coin-Flip EA v2.0 |
yes, we will work on it. |
|
| Author: | zhengzuodong [ Thu Aug 14, 2014 5:26 pm ] |
| Post subject: | Coin-Flip EA v2.0 |
Hello everyone. According to the aforementioned problems, I made some changes in the 2.6 version: 1 adds MinFreeMarginRatio parameters. Default setting is 500%, is used to control large Lots. 2 adds ProfitPercent parameters, when profit is equal to the balance * ProfitPercent, close orders. 3. Modify MagicNumber automatically adapt to eight pairs of major currency pairs, correspond as follows: pairs [8] = {"AUDUSD", "EURUSD", "GBPUSD", "NZDUSD", "USDCAD", "USDCHF", "USDJPY", "EURJPY"}; magic [8] = {111, 222, 333, 444, 555, 666, 777, 888}; The rest of the currency pair is set to 999. 4. adds orders closing and opening time display, and were labeled as "C" and "O" in the candles chart. 5. Some other minor amendments. 6. Updated to version 2.61 Please test forward any suggestions and questions are welcome. Trade Luck. Attachment CoinFlip EA V261 |
|
| All times are UTC | Page 10 of 19 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|