Topic: Questions about magicnumber

Hi experts,
I have some question about Ea Studio.

1. Does the magic number relate to strategy's ID I sort in the collection before exporting to Portfolio ea?

2. If the first question is true, If I remove some strategy and stay keeping the others.
How to code it? For keeping the rest of strategies don't change its magic number from an original.
(For example, I will remove the 2nd magic number.
First,3rd,4th number is the same strategies and keep working, But 2nd will not trade)

Sorry for my bad English,Hope you understand it.
Best regards

Re: Questions about magicnumber

1. Does the magic number relate to strategy's ID I sort in the collection before exporting to Portfolio ea?

There is no connection.

When you export a single expert, the Magic Number is the current time stamp.
When you export a Portfolio Expert, the Magic Number is the 1000 * Base Magic Number of the portfolio + the strategy index.

How to code it? For keeping the rest of strategies don't change its magic number from an original.

Comment out or delete the strategy Entry and/or Exit signal function call. For an example see the second strategy (with index 001 because the indexes start from 0).

void SetSignals(Signal &signalList[])
  {
   int i=0;
   ArrayResize(signalList,2*strategiesCount);
   HideTestIndicators(true);

   /*STRATEGY CODE {"properties":{"entryLots":0.1,"stopLoss":0,"takeProfit":36,... */
   signalList[i++] = GetExitSignal_00();
   signalList[i++] = GetEntrySignal_00();

   /*STRATEGY CODE {"properties":{"entryLots":0.1,"stopLoss":0,"takeProfit":74,"useStopLoss":false, ...*/
   // signalList[i++] = GetExitSignal_01();
   // signalList[i++] = GetEntrySignal_01();

   /*STRATEGY CODE {"properties":{"entryLots":0.1,"stopLoss":0,"takeProfit":29,"useStopLoss":false,...*/
   signalList[i++] = GetExitSignal_02();
   signalList[i++] = GetEntrySignal_02();

Re: Questions about magicnumber

Thank you very much, popov