| / | Forum |
|
kaleb
2009.07.02 18:24
Hi coders, I have a problem with a EA that i just coded and i hope you can help me: The problem seems to happen only in ECN 5-digits brokers and only in some pairs. The issue is that i have coded a hidden TP which works good on 4-digits and 5-digits brokers, but when i'm going to test in ECN 5-digits brokers it opens a trade and it closes instantly with little loss. That puzzles me because works good on other pairs of the same ECN 5-digits Broker. For example, works good on EURGBP but doesnt do on EURCHF and it's the same broker. Could be some bad data-feed on the bad-working pairs? I appreciate your assistance. Thank you |
|
Interview with Jimmy Tirtawangsa (fireflies) Gorez does a good job by predicting that GBPJPY will go south for many weeks. |
|
Ruptor
2009.07.02 21:03
Hi Kaleb Have you checked the values that cause the close condition using a print statment. It could be a coding bug like if the same value of price came in on two consecutive ticks your close condition might be met. With more decimal places the broker plays with the spread so only one price might move so check the bid and ask prices of the dodgy closes. |
|
kaleb
2009.07.02 22:38
Ruptor wrote >>
Hi Kaleb Have you checked the values that cause the close condition using a print statment. It could be a coding bug like if the same value of price came in on two consecutive ticks your close condition might be met. With more decimal places the broker plays with the spread so only one price might move so check the bid and ask prices of the dodgy closes. Hi ruptor, Thanks for your reply. this is the code FOR LONGS if (OrderType() == OP_BUY) FOR SHORYS (the inverse) if (OrderType() == OP_SELL) |
|
Ruptor
2009.07.02 22:53
Hi Kaleb The only suggestion for the code would be to RefreshRates before checking the Ask or Bid price. The print does not tell you the close price so you can check if it was at a valid stoploss or takeprofit. |
|
radovedni9
2009.08.27 17:20
kaleb wrote >>
Hi ruptor, Thanks for your reply. this is the code FOR LONGS if (OrderType() == OP_BUY) FOR SHORYS (the inverse) if (OrderType() == OP_SELL) Have you solved the problem by now? How did you solve it? |