A method for detecting fraudulent transactions, the method comprising: receiving, by a communication interface, data relating to a plurality of sessions including at least an electronic transaction, wherein the data includes at least one of user actions data and malware actions data; analyzing, by a hardware processor, the data to determine whether the electronic transaction is a possible fraudulent transaction based on a predetermined algorithm stored in an electronic memory, wherein the predetermined algorithm analyzes the data related to events occurring within a selected frame, wherein a frame size comprises an operating parameter of the predetermined algorithm specifying a duration of the frame; determining, by the hardware processor, whether the possible fraudulent transaction is a legitimate electronic transaction; adjusting, by the hardware processor, operating parameters of the predetermined algorithm using the received data when the hardware processor determines that the possible fraudulent transaction is a legitimate electronic transaction; analyzing, by the hardware processor, next data to determine whether another electronic transaction is a possible fraudulent transaction based on the predetermined algorithm having the adjusted operating parameters; characterized in that adjusting, by the hardware processor, the operating parameters using the received data comprises modifying the frame size by: calculating an average frame value by dividing an average duration of the plurality of sessions by an average number of events during the sessions; calculating a minimum frame value by dividing a minimum duration of the plurality of sessions by a minimum number of events during the sessions; calculating a reciprocal of the average frame value and a reciprocal of the minimum frame value; and updating the frame size used by the predetermined algorithm as an average of the calculated reciprocal of the average frame value and the calculated reciprocal of the minimum frame value. receiving, by a communication interface, data relating to a plurality of sessions including at least an electronic transaction, wherein the data includes at least one of user actions data and malware actions data; analyzing, by a hardware processor, the data to determine whether the electronic transaction is a possible fraudulent transaction based on a predetermined algorithm stored in an electronic memory, wherein the predetermined algorithm analyzes the data related to events occurring within a selected frame, wherein a frame size comprises an operating parameter of the predetermined algorithm specifying a duration of the frame; determining, by the hardware processor, whether the possible fraudulent transaction is a legitimate electronic transaction; adjusting, by the hardware processor, operating parameters of the predetermined algorithm using the received data when the hardware processor determines that the possible fraudulent transaction is a legitimate electronic transaction; analyzing, by the hardware processor, next data to determine whether another electronic transaction is a possible fraudulent transaction based on the predetermined algorithm having the adjusted operating parameters; characterized in that adjusting, by the hardware processor, the operating parameters using the received data comprises modifying the frame size by: calculating an average frame value by dividing an average duration of the plurality of sessions by an average number of events during the sessions; calculating a minimum frame value by dividing a minimum duration of the plurality of sessions by a minimum number of events during the sessions; calculating a reciprocal of the average frame value and a reciprocal of the minimum frame value; and updating the frame size used by the predetermined algorithm as an average of the calculated reciprocal of the average frame value and the calculated reciprocal of the minimum frame value. calculating an average frame value by dividing an average duration of the plurality of sessions by an average number of events during the sessions; calculating a minimum frame value by dividing a minimum duration of the plurality of sessions by a minimum number of events during the sessions; calculating a reciprocal of the average frame value and a reciprocal of the minimum frame value; and updating the frame size used by the predetermined algorithm as an average of the calculated reciprocal of the average frame value and the calculated reciprocal of the minimum frame value.