I have a question on how to make a switch for entry logic. My code has multiple entry conditions like on below example:
if (CrossAbove(Close, EMA1, 1))
if (TEMA1[0] > TEMA1[1])
if ((HMA1[0] > HMA1[1])
&& (RSI1.Avg[0] < 20)
&& (TEMA1[0] > TEMA1[1])
&& (CCi[0] < 20))
{
EnterLong(1, "MyEntry1");
}
When i am building a strategy i lock different entry conditions with //
//if (CrossAbove(Close, EMA1, 1))
//if (TEMA1[0] > TEMA1[1])
if ((HMA1[0] > HMA1[1])
&& (RSI1.Avg[0] < 20)
&& (TEMA1[0] > TEMA1[1]))
// && (CCi[0] < 20))
{
EnterLong(1, "MyEntry1");
}
Could you suggest how can i make a switch that so that i could turn on and off different combinations of entry conditions in Strategy properties on chart. Instead of going to the code and lock it with //.
Thanks
Comment