Originally Posted by AndrewAMD
Originally Posted by danatrader
I am not a developer myself
Originally Posted by Qw3rty
Also not a developer so I'm bangiing my head every step of the way and reading the maunal as much as posible.
You just might be a developer if you are:
* writing Zorro code and
* banging your head on the keyboard.

Welcome to the club! grin

If you can write a paragraph explaining how and why you want to increase the lot size, I think I can give better advice. Your ultimate goal is not exactly clear.


The life of a developer then lol.

The above is sample code but the outcome is still the same. I would like to reset the counter or Lot size to 1 for a specific condition when Equity has reached a new high by $X.

When trading using crossovers (as an example) one theory is to double down or use the martingale method on your losses to turn them into a profit. This works in theory but the moving average is exactly that, an average of price which isn’t sufficient and there can be unlimited losses and not an unlimited amount of money. With the moving average crossover there is a high and a low before a new cross happens (peak and trough of the trade). What I am trying to achieve is when a trades loses I increase the lot size BUT if the trade wins I might want to increase the lot size depending on if the Equity has reached a new high by X dollars. If a new Equity high is reached then the Lot value (count) moves to 1. Otherwise increase the count by X.

If open trade = new equity high then close trade.
If open trade <> new equity high then increase lot (regardless of winning or losing trade).

I really appreciate all the help. My head really hurts trying to get this right.

Let me know if I need to explain further.