Stop Loss and Take Profit Scripts - MetaTrader 4 Scripts | Trading Script Downloads - MT4/MT5 Resources






Collection of predefined scripts
A collection of predefined scripts saves time by making the required settings available immediately without having to type it.
Make your own script from the downloaded script - this may seem lengthy, but once completed it's actually a quick 1, 2, 3. You'll find it's surprisingly quick and easy.
Why keep resetting Scrip, indicator or EA default parameters, for example from 34 to 50? Change the default setting to 50 permanently or copy using the default 50!
Please follow the steps below

The only codes that need to be edited are the two 500 numbers.
// Script: 0-A SL 500 outer integer stop loss = 500 ;
Related information
The code behind the input tabs of scripts, indicators and Expert Advisors can always be located by looking for the code word "extern" (without quotes), which is always located near the top of the program.
The code word "int" represents an integer (..-2, -1, 0, 1, 2, ..). Basically a negative number or a positive number excluding decimal places. 'Int' defines "stop loss" as an integer value.
The code to change (as far as basic editing is concerned) will be the code after the = sign. Eg1: outer color line color = red; - change red to blue or green etc. For example 2: extern int line width=1; - Change 1 to 2, 3, 4 or 5. For example: extern string Font_Type = "Arial"; - changes Arial to "Arial Bold" or "Verdana". Please note that the parameters of string variables require quotes ("bla") (extern string ... = "bla";).
Text after // is used as a descriptive comment and is excluded from code functions. Sometimes code is commented out (// ..bla bla.. or /*..bla bla...*/ ) for reasons such as finding faults through an elimination process.
// Script: 0-A SL 800outer integer stop loss = 800 ;

test
Apply the same process to other scripts.
double: def - real number - including decimal part.
int: def - (integer) Integer - no decimal part.
Previous: 0-2 Buy Limit.mq4
// Default input: Starting external double buy lot size = 0.01; // One small external double buy limit = 0.0;
external integer slippage=3;
External integer stop loss = 0;
External integer take profit = 0; //Default input: end After: 0-2 buy limit 0200-0600.mq4
//Default input: starting external double buying lot size = 0.10; // one small lot
External double buy limit = 0.0;
outer integer slippage = 4; // My name is Jack and I coded slippagw at 4. I added comments after 200 at StopLoss and 600 at TakeProfit
External integer stop loss = 200; // 200 pips (20 pips)
External integer take profit = 600; // 600 pips (60 pips) // Default input: end After: 0-2 buy limit 0300-2000.mq4
//Default input: Start external double buy lot size = 10.00 ; // ten hands
External Double Buy Limit = 0.0;
external integer slippage = 5; // My name is Jill and I have encoded slippage as 5. I will not add comments after StopLoss and TakeProfit
External integer stop loss = 300;
External integer take profit = 2000; //Default input: endAttachment download
Source: MQL5 #11087
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •