I have two files First generated by Metatrader to save market watch symbols in a .Set files (set1.set)
the second one is (set2.set) and it is generated by a program.
I copied set2.set into MQL5\Profiles\SymbolSets path then i run metatrader5
i can see bout set1 and set2 , but whenever i load set2 into MarketWatch, no symbols added to Marketwtch.
so strange!!! they are the same but the second one is not working.
I don't recognise the text within (haha), but when I open using notepad, set1.set shows 1 line, but set2.set shows 4 lines.
When I do (MT4) Market Watch → Sets → Save As … I get an ANSI file. Your set1 is Unicode BOM but your set2 is UTF-8.
what is the difference.
both are Unicode. I Know that it contains Arabic character. I am using vb.net code to generate it
Dim OutPutFileName As String
OutPutFileName = "C:\CSV\Trend.set"
If File.Exists(OutPutFileName) Then File.Delete(OutPutFileName)
Dim Fso As FileStream = New FileStream(OutPutFileName, FileMode.CreateNew, FileAccess.Write, FileShare.None)
Dim SwFromFileTrueUTF8 = New StreamWriter(OutPutFileName, True, System.Text.Encoding.UTF8)
Dim i, Li As Integer
Dim CellVal As String
For i = 0 To Li
SwFromFileTrueUTF8.Write(Symbol(i) + vbLf)
MsgBox(OutPutFileName + " Created.")
System.Text.Encoding.Unicode Now It works properly. Thanks Guys