Help please. Double lots every time account grows by...
-
Does anyone know how to do this: I need Every time my account balance increases by 'X' amount then multiply the lots by an 'X' amount.
Thank you for your help. @l-andorrà if you can help I'd greatly appreciate it. -
you would need to do a variable modification first based on balance.
Now create a constant, for what X will be.
formula, balancevariable + constant = targetvariable
now check condition, if balance = targetvariable
(see below)
modify variable of lot size to be multiplied here now.also create a variable for lot size and youll want to x2 it in the same manner as prescribed above.
surely theres a much better way some genius has around here, but thats how I logically accomplish things
-
Chat GPT gives me this information when I asked how to increase lots by X when account balance increases by X amount... Question is how do I create a node 'code' via FXdreema. I've managed to build various bots and I am getting better with using this tool but I have never attempted something like this... How would you accomplish this using FXDreema?
// Define the initial account balance and lot size
double initialBalance = AccountBalance();
double initialLotSize = 0.01; // Modify this value to your desired starting lot size// Define the balance increment threshold
double balanceIncrement = 3000.0;//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void OnTick()
{
double currentBalance = AccountBalance();// Check if the balance increased by the threshold amount if (currentBalance >= initialBalance + balanceIncrement) { int lotDigits = MarketInfo(Symbol(), MODE_DIGITS); double currentLotSize = NormalizeDouble(initialLotSize * 2.0, lotDigits); // Modify the lot size with the increased value OrderModify(OrderTicket(), OrderOpenPrice(), currentLotSize, OrderTakeProfit(), 0, clrNONE); // Update the initial balance to the current balance initialBalance = currentBalance; Print("Lot size increased to ", currentLotSize); }}
-
@TipsyWisdom Thanks for your response... Here's what I have built based on how I interpreted what you described. How far off am I? Also see the Chat GPT comment I made below.

-
looks like youve got the idea man!
I think the best approach would be a scaled percentage based growth? if you are seeking a target % then your lot sizes could scale at the same % to keep the math simple and reuse the variable
-
also, you cant use the orange blocks like that in adjust. You must manually type it. because you can do math in the block using it that way.
to multiply using balance increment, it'll be "*balanceIncrement" with out the ""
-
@TipsyWisdom I think for now I'll keep it as multiply lots by 'X' if account balance increases by 'X', this just makes more sense to me at the moment. Thanks for pointing out the Orange block in the adjust is not good. So far everything I have tried has not worked, but I'll keep at it. I may continue to ask questions if that's okay.