magic number - letters allowed?

 

is it possible to add symbol letters into magic?

fex: int MagicNumber = Symbol()12345;

 

I believe that the magic number must be an int, so I do not think there is any way to add any string data directly to it. Symbol() data is represented as a string.

You could always add the string data from Symbol() to the order comments if that would work for you.

Alternatively I guess you could assign an integer value to each of the symbols you use, and somehow add that to the magic number, depending on how you are generating your magic numbers ....

 
Corvert Symbol to chars, convert chars to int values, concatenate them, and voilá
 

hmm, can you show me a example how to convert a symol?

Regards

 

loop over the string,

String result;
for(int i=0;i<StringLen(Symbol());i++){
  result=result+StringGetChar(Symbol(),i);
}
int resultInt = StrToInteger(result); 
 
thanks guys, this should work
 
fulltilt:

is it possible to add symbol letters into magic?

fex: int MagicNumber = Symbol()12345;

  1. RTFM OrderSend(... comment=NULL, int magic=0, datetime expiration ..)
  2. Totally unnecessary Filter by MN and pair and TF if necessary
Reason: