Hello everyone,
I would like your assistance with a compilation error I am getting that I haven't been able to resolve.
When I compile the code below, I am getting a "More than 1 symbol" error on the case expression of the switch statement. I've tried using an integer-type variable in the switch statement and replacing "case 'ATR'" for "case 1", for example, and my problem continues. What am I doing wrong?
Your assitance with this matter is greatly appreciated. Thank you in advance. Here is my code:
//+------------------------------------------------------------------+
double fnCalculateStop(int myOrderType, double EntryPrice, double Lots, string StopType, int iParam1)
//+------------------------------------------------------------------+
{
double InitialStop=0.0;
switch (StopType)
{
case 'ATR':
InitialStop=fnStop_ATR(myOrderType, EntryPrice, Lots, iParam1);
break;
default:
break;
}
return(NormalizeDouble(InitialStop,Digits));
}
//+------------------------------------------------------------------+
I would like your assistance with a compilation error I am getting that I haven't been able to resolve.
When I compile the code below, I am getting a "More than 1 symbol" error on the case expression of the switch statement. I've tried using an integer-type variable in the switch statement and replacing "case 'ATR'" for "case 1", for example, and my problem continues. What am I doing wrong?
Your assitance with this matter is greatly appreciated. Thank you in advance. Here is my code:
//+------------------------------------------------------------------+
double fnCalculateStop(int myOrderType, double EntryPrice, double Lots, string StopType, int iParam1)
//+------------------------------------------------------------------+
{
double InitialStop=0.0;
switch (StopType)
{
case 'ATR':
InitialStop=fnStop_ATR(myOrderType, EntryPrice, Lots, iParam1);
break;
default:
break;
}
return(NormalizeDouble(InitialStop,Digits));
}
//+------------------------------------------------------------------+