Hi everyone, hope you are all well can someone quickly check this and see if i have it set correctly.
I am counting losing trades which uses variable LossCountCount each loss increases the LossCountCount by 1
Then with this i am using the case function to return a different value see below. I wanted for example if LossCountCount was 5 that it returns a value 4 and this is then passed to LossCount variable. My concern is that having now returned 4 via case function LossCountCount is now 4 not 5 which is the correct count of the lossing trades.
If this the case can i for example return the case value directly to the LossCount variable and not affect the LossCountCount value. Hope it makes sense and you can help. Kind regards
switch (LossCountCount)
{
case 1 : return (1);
case 2 : return (1);
case 3 : return (2);
case 4 : return (3);
case 5 : return (4);
case 6 : return (6);
case 7 : return (9);
case 8 : return (14);
default: return (1);
}
LossCount == LossCountCount;
GlobalVariableSet("Loss"+Symbol(),LossCount);
I am counting losing trades which uses variable LossCountCount each loss increases the LossCountCount by 1
Then with this i am using the case function to return a different value see below. I wanted for example if LossCountCount was 5 that it returns a value 4 and this is then passed to LossCount variable. My concern is that having now returned 4 via case function LossCountCount is now 4 not 5 which is the correct count of the lossing trades.
If this the case can i for example return the case value directly to the LossCount variable and not affect the LossCountCount value. Hope it makes sense and you can help. Kind regards
switch (LossCountCount)
{
case 1 : return (1);
case 2 : return (1);
case 3 : return (2);
case 4 : return (3);
case 5 : return (4);
case 6 : return (6);
case 7 : return (9);
case 8 : return (14);
default: return (1);
}
LossCount == LossCountCount;
GlobalVariableSet("Loss"+Symbol(),LossCount);