Maximum length of a symbol name on FOREX - page 10

 
fxsaber:

Binding to a symbol and a chart handle are associated crutches. An EA can be multisymbol and/or not dependent on a chart symbol at all. So, it is logical that this EA can be run on any symbol. But we should also consider the variant when the EA is dependent on a chart symbol. In this case, the behavior should be opposite. As a result, there is no universal solution.

In most cases, this variant seems the most acceptable to me

Do you think this is the only crutch?

For FORTS, binding to the symbol name is the simplest and most accurate result (the names on FORTS are unique).

The task is to get an order, and there are crashes and delays in the terminal.

When using OrderSend(), if something happens, then we won't receive an order at all, and will hang in the function , waiting for timeouts.

If we use OrderSendAsync(), then the EA will continue to work immediately.

And only by using unique wizards for each symbol and each order (in either of the ways we send the order) we can quickly get an order.

If anybody has any ideas how to get unique mags for each order (without any crutches), please share them with us.

please share.

 
prostotrader:

only by using unique magics for each symbol and each order (with any method of sending an order) can we get an order.

You do not understand what I have said.

 
fxsaber:

You did not understand what I said.

I did, but I wrote for everyone.

Time will give the uniqueness of the EA's magik.

But there is no need to put it in input

 
prostotrader:

Time will give the uniqueness of the EA's magik.

But there is no need to put it in input

I will write without justification - I disagree.

 
fxsaber:

I'll write without justification - I disagree.

Do you think that a user, in one second, can set two identical EAs on the same symbol?

int OnInit()
{

  my_magic = ulong(TimeTradeServer());
  Print("my_magic = ", my_magic);
  Sleep(1100);
  my_magic = ulong(TimeTradeServer());
  Print("my_magic = ", my_magic);

  for (int i = 0; i < 10; i++)
  {
    ulong a_magic = GetMagic(i);
    Print(a_magic);
  }  
    return(INIT_SUCCEEDED);
}
2018.08.26 12:09:37.460 Test (BR-9.18,M1)       my_magic = 1535285377
2018.08.26 12:09:38.663 Test (BR-9.18,M1)       my_magic = 1535285378
 
prostotrader:

If anyone has any ideas on how to get unique mages for each order differently (without crutches),
please share.

each EA is its own setting (innputs)
stack all the inputs into a string (you may add a period character as well),
count crc32 - this is a unique label of the EA,
and we still have 4 bytes left for numbering the orders

 

Time, thank you, will give uniqueness to each EA and there is no need to link to ChartID() and path to the EA,

but you will still need to save the wizard in the Global Variable of the terminal.

 
Taras Slobodyanik:

Each EA has its own settings (intents)
add all the incites in a string (you can add a symbol-period),
count crc32 - this is a unique mark of the EA,
and we still have 4 bytes left for numbering the orders

It won't work.

The same EA on the same (different) symbols.

 
prostotrader:

Do you think that a user, in one second, can set two identical EAs on the same symbol?

As many as ten. With your permission, let me not spell out what I mean here

Forum on trading, automated trading systems and testing trading strategies

Maximum length of a symbol name in FOREX

fxsaber, 2018.08.25 22:25

Binding to a symbol and chart handle is an accompanying crutch. An EA can be multisymbol and/or not depend on a chart symbol at all. So, it is logical that this EA can be run on any symbol. But we should also consider the variant when the EA is dependent on a chart symbol. In this case, the behavior should be opposite. As a result, there is no universal solution.

In most cases, this variant seems the most reasonable to me

input int InputMagic = __DATETIME__;

string GetMagicString()
{
  return(__PATH__ + _Symbol + (string)InputMagic);
}

In a personal conversation, we would find an understanding in a minute. On the forum, on the other hand, you may just waste a lot of time with unclear objectives. This is not a matter of principle.

 
fxsaber:

Even ten. With your permission, let me not spell out what I meant here


In a personal conversation you would find understanding in a minute. On the forum, you can just waste a lot of time with incomprehensible goals. It's not a matter of principle.

OK

Reason: