Forum

Draw a custom chart with my own data

Hello, I can draw a chart in the indicator window with this code: #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red double Buff[], myData[ 10000 ]; int init() { SetIndexStyle ( 0 , DRAW_LINE , STYLE_SOLID , 1 , Red ); SetIndexBuffer ( 0 ,Buff);

Calculate free margin that will remain if a specified position has been CLOSED

Hello, we have AccountFreeMarginCheck() that will calculate the free margin that remains after the specified position has been opened. But how to calculate what will be the free margin if we close a certain position (not all of them)? Thank you