Skip to content

Instantly share code, notes, and snippets.

View MrSimonC's full-sized avatar

Mr Simon C MrSimonC

View GitHub Profile
@MrSimonC
MrSimonC / test.mq5
Created May 25, 2023 22:36
Update to training stop mql5 file to make it work
// Include necessary files
#include <Trade\Trade.mqh>
#include <Trade\SymbolInfo.mqh>
// Input parameters
input double RiskPercentage = 1.0; // Risk percentage per trade
input double ProfitPercentage = 2.0; // Profit percentage per trade
input double TrailingStopPoints = 50; // Trailing stop points
// Declare global variables
@MrSimonC
MrSimonC / ExcelResetUsedRange
Created August 22, 2017 08:53
Excel Reset Used Range
If your Microsoft Excel scroll bars scroll for a lot of cells, but you have a small amount of data, it is likely the used range needs to be reset.
Press Ctrl+End. If this doesn't jump to the end of your data, then follow the below guide:
To reset the used range in Excel, find the end of your data, then delete all the columns to the right, and all the rows below.
Press Alt+F11 to go to Microsoft Visual Basic, then press Ctrl+G to bring up the Immediate window.
In the Immediate window, type: `ActiveSheet.UsedRange` then hit Enter.
This will make Excel re-check the used range. Press Ctrl+End again and Excel will now jump to the end of your data.