Skip to content

Commit a721743

Browse files
author
EarnForex
authored
2.30
Fixed reference pair search. Fixed panel placement bugs. Fixed rounding issues. TP line will now appear if some TP is entered on the Script tab. Added tick size granularity adjustment for Script's multiple TP levels. Fixed a bug with TP line not appearing in MT4 version when ATR TP is turned on by default. Added input parameter (CalculateUnadjustedPositionSize) to disable broker-specific adjustments to the calculated position size. Fixed a bug with Entry line not appearing selected when default entry type is pending. PSC-Trader script updated to version 1.09 to provide a more obvious way of informing users about disabled AutoTrading.
1 parent 3adb5ed commit a721743

File tree

6 files changed

+14
-2
lines changed

6 files changed

+14
-2
lines changed
1.11 KB
Binary file not shown.
4.48 KB
Binary file not shown.

MQL4/Scripts/PSC-Trader.mq4

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//+------------------------------------------------------------------+
66
#property copyright "Copyright 2015-2020, EarnForex.com"
77
#property link "https://www.earnforex.com/metatrader-indicators/Position-Size-Calculator/#Trading_script"
8-
#property version "1.08"
8+
#property version "1.09"
99
#property strict
1010
#include <stdlib.mqh>
1111

@@ -47,6 +47,12 @@ void OnStart()
4747
int ot; // Order type.
4848
ENTRY_TYPE entry_type;
4949

50+
if (!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))
51+
{
52+
Alert("AutoTrading disabled! Please enable AutoTrading.");
53+
return;
54+
}
55+
5056
Window = WindowFind("Position Size Calculator" + IntegerToString(ChartID()));
5157
if (Window == -1)
5258
{
856 Bytes
Binary file not shown.
2.94 KB
Binary file not shown.

MQL5/Scripts/PSC-Trader.mq5

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//+------------------------------------------------------------------+
66
#property copyright "Copyright 2015-2020, EarnForex.com"
77
#property link "https://www.earnforex.com/metatrader-indicators/Position-Size-Calculator/#Trading_script"
8-
#property version "1.08"
8+
#property version "1.09"
99
#include <Trade/Trade.mqh>
1010

1111
/*
@@ -48,6 +48,12 @@ void OnStart()
4848
ENUM_ORDER_TYPE ot; // Order type.
4949
ENTRY_TYPE entry_type;
5050

51+
if (!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))
52+
{
53+
Alert("Algo Trading disabled! Please enable Algo Trading.");
54+
return;
55+
}
56+
5157
Window = ChartWindowFind(0, "Position Size Calculator" + IntegerToString(ChartID()));
5258

5359
if (Window == -1)

0 commit comments

Comments
 (0)