I think the inputs are self-explanatory.
The script sends one buy-order and calculates the lots by risk+sl (mode 1), sl by risk+lots (mode 2), lots by risk+sl given by atr (mode 3) and the lots by risk+sl, where the user types the sl (in pips or price, depends on the setting) in an input box.
To use the input-box feature, you have to install one dll, pls. see .zip-file contents for further instructions, copyright hints (dll by fx1.net, ordersend routines by steve hopwood) and so on (there you will finde the dll also).
Ok, you do not have to try the script on demo first, because there are some safety features implemented: DEMOmode=true. The script does not send an order. You have to set it to "false" to let the script do its work.
The inputbox for external variables will popup each time you call the script, to change that do this:
change that line in the code: #property show_inputs
to: //#property show_inputs
Further there will be a messagebox before sending the trade - you have to confirm the action.
to use the script for sell-orders also, you have to change the following external variable:
extern int type=OP_BUY; //OrderType(), OP_BUY or OP_SELL
If you have a use for the script, open it in the editor, change the parameters to suit your needs and save it under the name you want. After that you may assign an hotkey to the script and everytime you want to open an order, you will not press "f9" for the orderwindow, but the hotkey to call the script.
testers welcome, pls. report bugs, etc. pp.