I would like to write in easylanguage a system that weighs several parameters by giving each trade a score according to how many parameters it satisfies, and by accepting the trade depending on whether the overall score is high enough. How do I do it? For example, for my system, the basic signal is the crossover of two moving averages, and those are going to stay that way, but each crossover would get rated with a score from 1 to 10 by each of these parameters: time at which it happens RSI volume support/resistances general trend (according to a different timeframe) volatility All these parameters are ready, but I don't know how to transform their action from a "veto" that gets rid of a trade not satisfying them, to just a "vote" that only discourages a trade. Until now, I have used true/false so I could turn them off while testing, but even good parameters just end up hurting one another when they are used all together. For example this is the long signal: If CurrentBar > 1 And Fast Crosses Above Slow and ((VFast > VCoeff * VSlow and Vol_filter) or Vol_filter = false) and ((Close < PivPnt * (1 + S_PrTol) and PP_filter) or PP_filter = false) and ((SPivotAll = 1 and SP_filter) or SP_filter = false) and ((RangeAll = 1 and Range_filter) or Range_filter = false) and ((TimeAll = 1 and Time_filter) or Time_filter = false) and ((trend = 1 and Trend_filter) or Trend_filter = false) and ((LDayAll = 1 and Day_filter) or Day_filter = false) Then Buy This Bar;
Simple, you give each parameter a weighting. Can even be plus or minus. Add all the weights into one variable and then see if the value in the variable is good enough for your trade.
As juggernaut says⦠VoteForATrade=0; {weightings should add up to 100} Condition1Weighting=5; Condition2Weighting=10; Condition3Weighting=10; Condition4Weighting=25; Condition5Weighting=20; Condition6Weighting=5; Condition7Weighting=15; Condition8Weighting=10; Condition1=â¦; Condition2=â¦; Condition3=â¦; Condition4=â¦; Condition5=â¦; Condition6=â¦; Condition7=â¦; Condition8=â¦; If (Condition1) then VoteForATrade=VoteForATrade+Condition1Weighting; If (Condition2) then VoteForATrade=VoteForATrade+Condition2Weighting; If (Condition3) then VoteForATrade=VoteForATrade+Condition3Weighting; If (Condition4) then VoteForATrade=VoteForATrade+Condition4Weighting; If (Condition5) then VoteForATrade=VoteForATrade+Condition5Weighting; If (Condition6) then VoteForATrade=VoteForATrade+Condition6Weighting; If (Condition7) then VoteForATrade=VoteForATrade+Condition7Weighting; If (Condition8) then VoteForATrade=VoteForATrade+Condition8Weighting; If (VoteForATrade>50) then {trade};