You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
thanks for your useful tool. just a problem: i cannot modify the LOTS (double Lots = 0.01; // Lots (in pips)).
I get always 0.01 when i open a position. I`m not a programmer.
Thanks for your time.
thanks for your useful tool. just a problem: i cannot modify the LOTS (double Lots = 0.01; // Lots (in pips)).
I get always 0.01 when i open a position. I`m not a programmer.
Thanks for your time.
"Scripts, like other programs, can have input variables. However, for scripts, the parameter input dialog is not shown by default, even if the script defines inputs. To ensure that the properties dialog opens before running the script, the #property script_show_inputs directive should be applied. It takes precedence over script_show_confirm, that is, the output of the dialog disables the confirmation request (since the dialog itself acts in a similar role). The directive calls a dialog even if there are no input variables. It can be used to show the product description and version (they are displayed on the Common tab) to the user." (Scripts - Creating application programs - MQL5 Programming for Traders).
Replace:
with:
This will give you an adjustable setting upon attachment of the Script to a chart.A moderator corrected the formatting this time. Please format code properly in future; posts with improperly formatted code may be removed.
Thanks for your reply.
i changed the code:
but
error: 'Lots' - constant cannot be modified buy+sl+tp --------.mq5 53 4
Thanks for your reply.
i changed the code:
but
error: 'Lots' - constant cannot be modified buy+sl+tp --------.mq5 53 4
The OP's code is convoluted with GlobalVariables (GV's). With the show inputs directive, there's no need for GV's. Additionally, there is no point multiplier to convert points to pips. In the code attached to this post, I added SL and TP inputs, re-commented the SL and TP inputs to points, and deleted the GV's. This code compiles but is not tested.