It would help if you provide complete code which compiles - i.e. include the declaration/setting of Sname and also the print statement you are using.
The main loop checks through all market watch symbols:
for(int s=0;s<SymbolsTotal(true);s++){ string SName=SymbolName(s,true);
The internal loop intends to filter only by traded symbols, print values are the following:
Print("SProfit: ",SProfit,", SLoss: ",SLoss);
Any help on this matter is welcome.
Hi there community, I'm trying to get Symbol Profit values from the loop. Made this way:
Print result is throwing value 0 almost every time:
SProfit: 0.0, SLoss: 0.0
HigherProfit: 0.0
SProfit: 0.62, SLoss: 0.0
HigherProfit: 0.62
SProfit: 0.0, SLoss: 0.0
HigherProfit: 0.0
SProfit: 0.0, SLoss: 0.0
HigherProfit: 0.0
...
How is this possible?