Can someone help me with the EA code to have the EA set the number of lots executed in a trade?
This would be to embed into an existing MA crossover EA...
The trade Lot size should be based on initial user input risk %; current balance; and initial user input stop size...
Lots = (Balance * risk %) / (stop loss in pips * $ per pip)
I've tried a few lines of code, that didn't work -- and I don't know if I'm screwing up the syntax, or just tryng to use a variable (Lots) that MT won't allow you to adjust dynamically in an EA, or what...
Any advice/help would be greatly appreciated!
This would be to embed into an existing MA crossover EA...
The trade Lot size should be based on initial user input risk %; current balance; and initial user input stop size...
Lots = (Balance * risk %) / (stop loss in pips * $ per pip)
I've tried a few lines of code, that didn't work -- and I don't know if I'm screwing up the syntax, or just tryng to use a variable (Lots) that MT won't allow you to adjust dynamically in an EA, or what...
Any advice/help would be greatly appreciated!