Strategy Tester Allows Positions of up to 100[Lots]

 

B"H


Hello,

Using the strategy tester, positions of a volume larger than 100[Lots] are not allowed.

How can I change this limitation to a higher number?


Thanks.

 

use some broker which allows higher lotsizes, i have one where max lotsize is 1000. but since it's a ECN broker you will never get the price you want with such a high lotsize.

also for testing i sugest trading at fixed lotsize, in that way you see the basic performance of your strategy. afterwards you can add moneymanagement to adjust Drawdown and you will see how much gain is to be expected.

of course if you are developing some martingale strategy this won't work. as brokerdiscussion are not allowed here i will send you the name by pm.

//z

//edit:

alternativly if a order exeeds the maxLot's you can split the order in two or more, by using this method you can buy as much as you want.

 
Simha:

B"H


Hello,

Using the strategy tester, positions of a volume larger than 100[Lots] are not allowed.

How can I change this limitation to a higher number?


Thanks.


Over 50 standard lots broker have to aprove your trade.

 
zzuegg:

use some broker which allows higher lotsizes, i have one where max lotsize is 1000. but since it's a ECN broker you will never get the price you want with such a high lotsize.

also for testing i sugest trading at fixed lotsize, in that way you see the basic performance of your strategy. afterwards you can add moneymanagement to adjust Drawdown and you will see how much gain is to be expected.

of course if you are developing some martingale strategy this won't work. as brokerdiscussion are not allowed here i will send you the name by pm.

//z

//edit:

alternativly if a order exeeds the maxLot's you can split the order in two or more, by using this method you can buy as much as you want.


Thanks for your reply.

Are there several available brokers for a demo account?

If so, can you say how to configure my application to work with another broker?


Thanks,

Simha.

 
Simha:
Using the strategy tester, positions of a volume larger than 100[Lots] are not allowed.
How can I change this limitation to a higher number?

You can't. The largest lot size is given by MarketInfo(Symbol(), MODE_MAXLOT) On IBFX that is 50. Broker limitation. To exceed that you must open multiple orders.
double  LotStep = MarketInfo(Symbol(), MODE_LOTSTEP),   // IBFX= 0.01
        maxLot  = MarketInfo(Symbol(), MODE_MAXLOT );   // IBFX=50.00
// If a trade size is bigger than maxlot, it must be split into several.
for (int split=MathCeil(lotsNew/maxLot); split>0; split--){
    // 50.00+49.99=99.99    25.01+25.00+25.00+25.00=100.01
    if (split == 1) double size = lotsNew;
    else {  size=MathCeil(lotsNew/split/LotStep)*LotStep; lotsNew -= size; }
    /* Put the magic number in the "Comment" field so you can see it on
     * the Metatrader terminal. This way you can figure out what is what
     * as magic numbers are not available in the user-interface.
     * --LibOrderReliable */
    cmnt = StringConcatenate(    WindowExpertName(),         " ",
            Symbol(),   ",",    Period.text,    ", ",           op.text,
            " ",        size,   " (",           magic.number,   ")");

    #define NO_SL       0   // Yet
    #define NO_TP       0
    oo.ticket = OrderSend(  Symbol(),       op.code,        size,
                            now.open,       Slippage.Pips*pips2points,
                            NO_SL,          NO_TP,          cmnt,
                            magic.number,   NO_EXPIRATION,  op.color);
    if (oo.ticket < 0){     Alert("OrderSend(type=",    op.code,
            " (",   op.text,    "), lots=", size,
            ", price=", DoubleToStr( now.open,              Digits     ),
                " (",   DoubleToStr((now.open-Bid)/pips2dbl,Digits.pips),
            "), SL=0, TP=0, '", no.open, "', ...) failed: ",GetLastError());
        no.open = "|OrderSend Failed";              // GetLastError first.
        break;
    }
    ModifyStops();                              // Set TP/SL ASAP
    if (split>1)    Refresh(); // RefreshRates()
}   // for(split)
Reason: