Forex_Strategy_Builder.Strategy.MoveFilterUpwards C# (CSharp) Method

MoveFilterUpwards() public method

Moves a filter upwards.
public MoveFilterUpwards ( int slotToMove ) : void
slotToMove int
return void
        public void MoveFilterUpwards(int slotToMove)
        {
            Data.Log("Move a Filter Upwards");

            if (slotToMove > 1 && Slot[slotToMove].SlotType == Slot[slotToMove - 1].SlotType)
            {

                IndicatorSlot tempSlot = Slot[slotToMove - 1].Clone();
                Slot[slotToMove - 1] = Slot[slotToMove].Clone();
                Slot[slotToMove] = tempSlot.Clone();

                // Sets the slot numbers.
                for (int slot = 0; slot < Slots; slot++)
                    indicatorSlot[slot].SlotNumber = slot;
            }

            return;
        }