PDA

Zobacz pełną wersję : Handel na różnych wykresach z tym samym EA



mytragh
07-19-2006 17:15, 17:15
Mam EA, które używam przy użyciu testów do przodu, ale wciąż mam problem. Nie mogę mieć jednocześnie aktywnych zleceń na różnych wykresach (każdy wykres przedstawia inną parę).

Mam za każdym razem sprawdzanie symbolu, ale nie mogę znaleźć przyczyny, dla której nie stosuje się wielu zamówień z różnymi walutami. To prawda, że ​​zdarzają się transakcje z różnymi parami, ale za każdym razem tylko jedna para. Miałem nadzieję, że wiele par będzie miało aktywne zlecenie, każda para będzie miała jedno zamówienie na raz. Ale mam jedno zamówienie, by wszystkie pary zdarzyły się raz.

Poniżej znajduje się kluczowy kod, w którym uruchamiane jest zamówienie. Czy czegoś brakuje?

Dzięki za pomoc z góry.

Kod:


int start ()
{
int count;

if (Barslt; 100) {Drukuj (paski mniejszy niż 100); return (0); }

total = OrdersTotal ();

if (trend! = 0) {last_trend = trend; }
trend = MACD_Direction ();
strength = trend_strength ();

if (pending_timegt; 0) last_pending_time = pending_time;

dla (count = 0; countlt; total; count ) gt;
{
OrderSelect (liczba, SELECT_BY_POS, MODE_TRADES);
if (OrderType () lt; = OP_SELL OrderSymbol () == Symbol ())
{
if (OrderType () == OP_BUY find_highest)
{
trailing_stop (1);
if (Close [0] gt; = OrderOpenPrice () Point * 5) {pending_time = 0; revival_attempts = 0; opposite_trend_duration = 0; opp_trend_period = 0; }
if (Close [0] lt; orderopenprice () point * 5) {= pending_time = last_loss = OrderOpenPrice () Point * 5-Close [0]; opp_trend_period = 0;} lt; brgt; if (strengthlt; = - 0,95 * poziom MACD) opp_trend_period ;
if (best_deal () gt; 0) ClosePending ();
}
else if (OrderType () == OP_SELL find_lowest)
{
trailing_stop (2);
if (Close [0] lt; = OrderOpenPrice () - Point * 5) {pending_time = 0; revival_attempts = 0; opp_trend_period = 0; }
if (Close [0] gt; OrderOpenPrice () - Point * 5) pending_time ;
if (strengthgt; = 0,95 * poziom MACD) opp_trend_period ;
if (best_deal () gt; 0) ClosePending ();
}
}
}

if (trendgt; 0 strengthgt; = 0,95 * MACD_level) {buy_flag = true; sell_flag = false; last_trend = trend; }
if (trendlt; 0 strengthlt; = - 0.95 * MACD_level) {sell_flag = true; buy_flag = false; last_trend = trend; }

if ((sell_flag == true || buy_flag == true) total == 0 trend! = 0)
{
if (buy_flag == true) do_order (1);
if (sell_flag == true) do_order (2);
}
}
lt;orderopenprice () point * 5) gt; lt;total; count ) gt;