Page 2 of 2

Re: Risk Management Indicator

PostPosted: Mon Apr 12, 2021 11:11 pm
by fortesan9
Thanks Don Apprentice,

Re: Risk Management Indicator

PostPosted: Thu Apr 15, 2021 5:14 am
by Apprentice
RiskManagement.lua
(16.19 KiB) Downloaded 228 times

RiskManagement.lua.rc
(10.91 KiB) Downloaded 216 times


Try this version.

Re: Risk Management Indicator

PostPosted: Fri Apr 16, 2021 1:29 pm
by fortesan9
Does not display all data when applying the indicator on the charts.

what am i doing wrong?

Re: Risk Management Indicator

PostPosted: Mon Apr 19, 2021 2:38 am
by Apprentice
You havn't install it.

Re: Risk Management Indicator

PostPosted: Tue Apr 20, 2021 10:43 pm
by fortesan9
The results for Lots, Position Cost, Position Value, Applied Leverage, Limit Profit in $, and Position Profit Margin appear incorrect, these are the formulas:

Lots = (Position Risk Value / Pip Value)

Position Cost = (MMR * Lots)

Position Value = (Lot Size * Lots) * Price

Applied Leverage = (Position Value / Account Equity)

Limit Profit in $ = (Pip Cost) * (Limit Profit in Pips) * (Lots)

Postition Profit Margin = (Limit Profit in Pips / Account Equity)

Re: Risk Management Indicator

PostPosted: Wed Apr 21, 2021 11:35 am
by fortesan9
Apprentice wrote:You havn't install it.


Displays perfectly fine now, Thanks Don, just the mentioned formulas i think..

Re: Risk Management Indicator

PostPosted: Wed Apr 21, 2021 11:37 am
by Apprentice
Your request is added to the development list.
Development reference 392.

Re: Risk Management Indicator

PostPosted: Wed Apr 28, 2021 8:54 am
by Apprentice
Everything as requested. From the code:

local lots = position_risk_value / pip_value;
CellsBuilder:Add(MAIN_FONT, "Position Cost", text_color, 1, row, 0);
CellsBuilder:Add(MAIN_FONT, win32.formatNumber(MMR * lots, false, 2), text_color, 2, row, 0);
local position_value = entry_price * baseUnitSize * lots;
local leverage = (baseUnitSize * lots * entry_price / equityAmount);
CellsBuilder:Add(MAIN_FONT, "Limit Profit in $", text_color, 1, row, 0);
CellsBuilder:Add(MAIN_FONT, win32.formatNumber(limit_curr, false, 2), text_color, 2, row, 0);
CellsBuilder:Add(MAIN_FONT, "Position Profit Margin %", text_color, 1, row, 0);
CellsBuilder:Add(MAIN_FONT, win32.formatNumber(100 * limit_curr / equityAmount, false, 2) .. "%", text_color, 2, row, 0);