Method of testing of the systems

Hello. Happy New year! Is it possible in Amibroker to test this distribution? Describe the essence of the problem. Have N number of systems (for example 3) and the score (for example 1 000 000). The account is divided by the number of systems not in equal parts, and modified, some more, some less (for example, buy1 – 20%, buy2 30%, and buy3 – 50%). There is a list of stocks, begin to touch on the presence of a signal buy1. On the first transaction is conducted and then go to the system buy2. It also enumerates the presence of a signal but if the signal appeared in the action, which already has a deal buy1, skip this Issuer and move on. Similarly with other systems, market entry occurs in issuers that are not occupied by the upstream systems to the corresponding systems of the account. Is it possible to do so?


if( Status("action") == actionPortfolio )
   bo = GetBacktesterObject();

buy1 = C > Ref(H,-1);
sell1 = Day() != Ref(Day(),1);

buy2 = Cross(EMA(C,5), EMA(C,10));
sell2 = Cross(EMA(C,10), EMA(C,5));

buy3 = C > Ref(H,-1);
sell3 = Day() != Ref(Day(),1);

Buy = buy1 OR buy2 OR buy3;
Sell = sell1 OR sell2 OR sell3;

Sorry for my English, I hope the meaning is clear. Maybe at least the logic of the writing prompt?

Quite frankly I have trouble understanding what you are after. But if you are looking for methods to test multiple systems there are few threads about that, 3 top search entries should give you some pointers:

1 Like

Can so it is more clear.

  1. Systems can be different
  2. Number of systems is different
  3. Deposit for example 1 000 000 (Buy1 = 20%, Buy2 = 30%, Buy3 = 50% or (10, 10, 80) or (40,40,20), Those. variables)


is there an way to produce a backtest report similar to the one illustrated by @DMITRY in his post from Method of testing of the systems.

Here is the @DMITRY sample.

On a side note, are there any 3rd party products for Amibroker that anyone can suggest for custom reports?

You could just ask @DMITRY directly. I guess this is just done in Excel as that is just a table. Table can be generated also as HTML and the example is shipped with AmiBroker, Report Charts folder: Profit Table

1 Like

Yes, it's Excel.
So I try to explain what is needed.
Is it possible to do this?

@tomas Thank you. With your response I now realize I can insert report code directly into my custom backtest and write out an HTML (or other data file containing trade information) file for use in a custom calendar type (or any other) report.

1 Like

Everything possible with custom backtester plus static variables, there are plenty of examples on the forum (already gave a link), in the Knowledge Base: , in the old User KB:

1 Like

Please help. How to write in a static variable Buy1 – 3 and Sell1 – 3?

I want to develop a complete system for guiding the position after entering the raynek. I have chosen the entry point buy = bbc (bbc = H / L> from behind AND C <O AND H <EMA (H, 3):wink: I set two scenarios after entry: 1 - if the price increases by 5 bars by 1% then I create Break Even and if the price starts to fall after exceeding the indicated value (purchase price + 1%), the position is closed. And further: if the price increases by another 1% (over the value of Break Even), then the shift takes place on the TralingStop basis. And so rolling every 1% 2 - if the price falls (regardless of the number of bars), for example, 1% I leave the position ie StopLoss In the current state, all signals appear on the same bar. Each time the sale occurs at the same point. I am asking for suggestions.

zza = Optimize("zza", 1.0019, 1.018, 1.02, 0.001);
zz = Param("zz", zza, 1.018, 1.02, 0.001);

bbc = H/L > zza AND C < O AND H < EMA(H, 3);
PlotShapes(bbc*shapeCircle, colorWhite,0, Low);

Buy = bbc;

BE = bbc+(bbc *0.01); // BUY + 1%
// Plot( BE, "BE", styleLine | styleThick ); // I would like a continuous line to be displayed from each Buy bar until Sell, // however, only the green line appears at the bottom of the chart

BE1 = BE + (BE * 0.01);
//PlotShapes(BE1*shapeUpArrow, colorYellow,0, High);

SL = bbc - (bbc * 0.01);
PlotShapes(SL*shapeUpArrow, colorRed,0, Low);

Sell = Cross(C, BE) OR SL OR BE1 ;
PlotShapes(Sell*shapeUpArrow, colorBlue,0, High); // signal on the same bar as BUY


See How to ask a good question.

Also, you make it difficult for other people to help you when you can't be bothered using any of the following words: "Hi", "Please" or "Thank you".

You just use: