RE: EA Scaling in Lots-Can't make it have control of Lots

 

Earlier I forgot to put in the code that I want to have this work on. It is attached here now. This is like a Semi-Auto EA. Enters trades well, then keeps adding more lots and won't close the trades. Need to get this

fixed. I am a newbie coder and this one has got me. Hope someone can help me with this.

JimTrader1

"Jims Trading Machine"

 
I toke a look a this earlier. It's a very simple solution. Just limit the trading. For beginning use something like if(OrderTotals==0){_Then_Trade_}. Your fix is too broad I recommend you read the Book.
 
ubzen:
I toke a look a this earlier. It's a very simple solution. Just limit the trading. For beginning use something like if(OrderTotals==0){_Then_Trade_}. Your fix is too broad I recommend you read the Book.


Ok. I will try this.Yeah I have to keep reading. One thing here, is OrderTotals ok for Market Orders? That's what it's doing here. Seems like it would be Maximum

Trades or Lots to me.

Thanks much,

JimTrader1

"JimsTradingMachine"

 
Yes, OrdersTotal() will return the number of open Market-Orders as well as Pending-Orders. Your EA last time I looked, just kept placing trades. It's a Trade or Lots issue either way you look at it. Limit the trade to 1, then worry about what the Lots-Size of the One Trade should be.
Reason: