Information

Username: Alwin123
Member since: 28 Oct 2022
Last login: 28 Oct 2022
Status: Active

Activity

Where Created Comments
Algorithms 0 1
Forum Topics 9 20
Jobs 0 0

Last Algorithm Comments

AL
Alwin123 · 1 year ago

is there anyone who can correct this for me. I would like the number of martingale trades not to go on indefinitely.in this bot

i tried it with : if (StaticVolumeMultiplier.Length <= MaxTrades) ResetTPFlags(); ResetMartingaleVariables(); ResetDrawdown();

 

 

private void ApplyMartingaleEffect()
        {
            
            // This volume multiplier will be affected by the automatic money management. 
            VolumeMultiplier = Multiplier + StaticVolumeMultiplier;
            StaticVolumeMultiplier += Multiplier ;

            if (StaticVolumeMultiplier.Length <= MaxTrades)            
            
                ResetTPFlags();
                ResetMartingaleVariables();
                ResetDrawdown();

            

            StopLoss = InitialStopLoss + VolumeMultiplier;
            TakeProfit = TPOverridenFlag ? InitialStopLoss + VolumeMultiplier : InitialTakeProfit + VolumeMultiplier;
            FirstPositionFlag = false;
            if (OverrideCycle == true)
                CycleOverridenFlag = true;
            if (AutomaticMoneyManagementFlag == true)
                AutomateMoneyManagement();                       
        }