货币的交易价差。撒播器2 - 页 14

 
Reshetov >>:


...Если поставить малый размер входному параметру profit, то депо будет слито очень быстро.



你能告诉我如何确定利润参数的最佳大小吗?

也许取决于存款的大小?但究竟如何?

 
顺便说一下,在不到24小时的时间里,在演示中+10%的存款。
 

代码中存在一个错误

我们需要纠正其中的一块。

   double secondlots = 0;

   for (int i = 0; i < total; i++) {
      OrderSelect( i, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol()) {
         currentticket = OrderTicket();
         currentprofit = currentprofit + OrderProfit();
         currenttype = OrderType();
      }
      if (OrderSymbol() == seconds_instrument) {
         secondticket = OrderTicket();
         secondtype = OrderType();
         currentprofit = currentprofit + OrderProfit();
         secondlots = OrderLots();
      }
   }


   if (( secondticket < 0) && ( currentticket >= 0)) {
      Comment("Try close positon for " + Symbol());
      if ( currenttype == OP_BUY) {
         if (OrderClose( currentticket, lots, Bid, 2, Blue)) {
            openbarspriceonly = true;
         }
         return(0);
      } else {
         if (OrderClose( currentticket, lots, Ask, 2, Red)) {
            openbarspriceonly = true;
         }
         return(0);
      }
   }

   double currentlots = 0;
   double secondlots = 0;

   for (int i = 0; i < total; i++) {
      OrderSelect( i, SELECT_BY_POS, MODE_TRADES);
      if (OrderSymbol() == Symbol()) {
         currentticket = OrderTicket();
         currentprofit = currentprofit + OrderProfit();
         currenttype = OrderType();
         currentlots = OrderLots();
      }
      if (OrderSymbol() == seconds_instrument) {
         secondticket = OrderTicket();
         secondtype = OrderType();
         currentprofit = currentprofit + OrderProfit();
         secondlots = OrderLots();
      }
   }


   if (( secondticket < 0) && ( currentticket >= 0)) {
      Comment("Try close positon for " + Symbol());
      if ( currenttype == OP_BUY) {
         if (OrderClose( currentticket, currentlots, Bid, 2, Blue)) {
            openbarspriceonly = true;
         }
         return(0);
      } else {
         if (OrderClose( currentticket, currentlots, Ask, 2, Red)) {
            openbarspriceonly = true;
         }
         return(0);
      }
   }
 
vis_inet >>:
Кстати, меньше чем за сутки на демо +10% от депо.

工作室里的交易清单!

我已经有-20%的Depo 2天了,我今天在测试第3版,到目前为止是负数。

 
David177 >>:

Список сделок в студию!

У меня за 2 суток -20%депо, сегодня тестирую 3-ю версию, пока в общем минуса.

在这里, 测试开始前,天平大约为1054。

设置:手数0.1,利润25。

 

尤里,请使第二个版本为两对变量中指定的手数打开--相等。谢谢你。

 
和那个......咳咳......。并在第三个版本中加入magik。
 
第三个人是真的失去了它。
 
dimasik >>:

Юрий, сделайте пожалуйста во второй версии чтобы открывал размеры лота, заданные в переменных для обеих пар - равнозначные. Спасибо.


或者说,第二对的手数可以在设置中指定。
原因: