OPEN-SOURCE SCRIPT
Updated SMART4TRADER-Margin ZONE

Indicator based on marginal zones (according to Mityukov Sergey). In open source.
Formula for calculating the margin:
Margin size / cost tick * minimum price change
Example:
EURUSD = 2100 $ / 6.25 $ * 0.00005 points = 0.01680 points
....
For currency pairs where USD is in the first place it is necessary to write so that the indicator is taken away from zero
Iff (ticker == "USDCAD", (0- (950/5 * 0.00005)),
//////////////////////////////////////////////////////////////////////////////////////////////////
Индикатор на основе маржинальных зон (по Митюкову Сергею). В открытом исходном коде.
Формула рассчета маржи:
размер маржи / стоимость тика * минимальное ценовое изменение
Пример:
EURUSD = 2100 $ / 6.25 $ * 0.00005 points = 0.01680 points
....
Для валютных пар где USD стоит на первом месте нужно писать так, чтобы показатель отнимался от нуля
iff (ticker=="USDCAD", (0-(950/5*0.00005)),
//////////////////////////////////////////////////////////////////////////////////////////////////
Formula for calculating the margin:
Margin size / cost tick * minimum price change
Example:
EURUSD = 2100 $ / 6.25 $ * 0.00005 points = 0.01680 points
....
For currency pairs where USD is in the first place it is necessary to write so that the indicator is taken away from zero
Iff (ticker == "USDCAD", (0- (950/5 * 0.00005)),
//////////////////////////////////////////////////////////////////////////////////////////////////
Индикатор на основе маржинальных зон (по Митюкову Сергею). В открытом исходном коде.
Формула рассчета маржи:
размер маржи / стоимость тика * минимальное ценовое изменение
Пример:
EURUSD = 2100 $ / 6.25 $ * 0.00005 points = 0.01680 points
....
Для валютных пар где USD стоит на первом месте нужно писать так, чтобы показатель отнимался от нуля
iff (ticker=="USDCAD", (0-(950/5*0.00005)),
//////////////////////////////////////////////////////////////////////////////////////////////////
Release Notes
updateRelease Notes
improved formula and smooth added------------
улучшена формула и добавлено сглаживание
What new and change
////////////////////////////////////////////
MP=
iff (syminfo.ticker=="EURUSD", 2000/6.25*0.00005,
iff (syminfo.ticker=="GBPUSD", 2100/6.25*0.0001,
iff (syminfo.ticker=="AUDUSD", 1350/10*0.0001,
iff (syminfo.ticker=="USDCAD", (0-(1100/5*0.00005)),
iff (syminfo.ticker=="USDCHF", (0-(2800/5*0.00005)),
iff (syminfo.ticker=="USDJPY", (0-(2150/6.25*0.0000005)),
iff (syminfo.ticker=="USDMXN", (0-(1200/5*0.00001)),
iff (syminfo.ticker=="BTCUSD", 2064/25*5,
iff (syminfo.ticker=="SPX500", 6300/12.5*0.25,
iff (syminfo.ticker=="NAS100", 7600/5*0.25,
iff (syminfo.ticker=="US30", 5500/5*1,
na))))))))))) //внимательно следим за кол-вом скобок
/////////////////////////////////////////////////////// дата корректировки 21.08.2019
Release Notes
USDCHF / USDCAD / USDJPY currency pairs are disabledavailable CHFUSD / CADUSD / JPYUSD
--------------
валютные пары USDCHF/USDCAD/USDJPY отключены
доступны CHFUSD/ CADUSD/ JPYUSD
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.