InformedTrades
Register as a Member
    Why join? See our testimonials.

Register Front Page See Today's Posts Site
Map
Free Trading
Courses
Shop
Front Page > Forum Central (F1) > David's Corner > Free Trading Courses

 
Thread Tools Search this Thread Display Modes
Old 03-30-2009, 12:38 PM   #1 (permalink)
InformedTrades Founder
Community Host
 
David Waring's Avatar
 
Join Date: Nov 2007
Location: Miami, FL
Posts: 5,622

Thanks Stats
Thanks (Given): 0
Thanks (Received): 108

How to Trade Using Metatrader Part 1



__________________
InformedTrades University | Become a Patron of Our University


Disclaimer: Trading is risky and can result in substantial financial loss. As always my posts are simply one traders opinion and should not be taken as trading advice. I am not a financial adviser so everyone please do their own analysis and take responsibility for their own trades.
David Waring is offline   Reply With Quote
 
Old 05-27-2009, 04:10 AM   #2 (permalink)
 
Join Date: May 2009
Posts: 2

Thanks Stats
Thanks (Given): 0
Thanks (Received): 0

Margin


Hi David,

I have a question that sounds simple but I was not able to find a good answer to it. Maybe you can help me.

In the terminal view (Metatrader) all the data for the open positions are shown.
In the last line the Balance, Equity, Margin, FreeMargin and MarginLevel are shown.
See the image.

My question is now, how the Margin value is calculated ?
I tried to find an answer by experimenting, but failed.

Best regards

Antomi
Attached Thumbnails
How to Trade Using Metatrader Part 1-margin-jpg  
Antomi is offline   Reply With Quote
 
Old 05-27-2009, 03:08 PM   #3 (permalink)
 
Join Date: Apr 2008
Location: DFW, Texas
Posts: 206

Thanks Stats
Thanks (Given): 0
Thanks (Received): 4
Send a message via Skype™ to Shaun Overton

Antomi,

Your broker determines the margin requirements for a trade. Most mini accounts, for example, require 0.5% margin.

If you traded 1 mini lot of USD/JPY, this means you're trading $10,000. 0.5% of $10,000 is $50. Thus, your margin requirement is $50.
__________________
Shaun Overton
Shaun Overton is offline   Reply With Quote
 
Old 05-27-2009, 03:42 PM   #4 (permalink)
 
Join Date: May 2009
Posts: 2

Thanks Stats
Thanks (Given): 0
Thanks (Received): 0

Margin calculation


Shaun,
Thank you for the info.
I receved also an additional information:

Margin is the amount of funds required to be held on an open position. It is calculated as amount of base currency divided by leverage. 1 lot = 100,000 units of base currency, 0.1 lot = 10,000 units of base currency, 0.01 = 1,000 units of base currency. Base currency is the first currency in the pair.

Example:

A trade of 1 lot on the GBP/USD with a leverage of 1:500
1 lot = 100000 units of base currency, so in this case 100000
100000 / 500 = 200
The margin required for this trade is 200

Regards

Antomi
Antomi is offline   Reply With Quote
 
Old 05-27-2009, 03:51 PM   #5 (permalink)
 
Join Date: Apr 2008
Location: DFW, Texas
Posts: 206

Thanks Stats
Thanks (Given): 0
Thanks (Received): 4
Send a message via Skype™ to Shaun Overton

Antomi,

Thanks for posting that for everyone. It's another common way to discuss margin that confuses everyone.

200:1, for example, is the same thing as 0.5% margin.
500:1 is the same as 0.2% margin.
__________________
Shaun Overton
Shaun Overton is offline   Reply With Quote
 
Old 07-27-2009, 12:00 PM   #6 (permalink)
 
Join Date: Jul 2009
Posts: 1

Thanks Stats
Thanks (Given): 0
Thanks (Received): 0

indicator in mq4


[Hello, I watched a video on youtube about install mt4 indicators, and I got one question, I was looking for one indicator, but I could only find its code, how can I do to turn this code into an indicator? sorry for this question, I'm a beginner in this mt4 stuff, thank you.

Just in case, this is the code I found:

//+------------------------------------------------------------------+
//| OsMA.mq4 |
//| Copyright 2004, MetaQuotes Software Corp. |
//| Forex Trading Software: Forex Trading Platform MetaTrader 4 |
//+------------------------------------------------------------------+
#property copyright "colour update by thor@gmx.co.uk, Moneytec chat: thorr"
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Maroon
#property indicator_color2 DarkGreen
#property indicator_color3 Lime
#property indicator_color4 OrangeRed
//---- indicator parameters
extern int FastEMA=8;
extern int SlowEMA=12;
extern int SignalSMA=9;
extern double thresh = 0.0001;
//---- indicator buffers
double ind_buffer0[];
double ind_buffer1[];
double ind_buffer2[];
double ind_buffer3[];
double ind_brighthi[];
double ind_brightlo[];
double res;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- 2 additional buffers are used for counting.
IndicatorBuffers(6);
//---- drawing settings
SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2);
SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,2);
SetIndexStyle(2,DRAW_HISTOGRAM,STYLE_SOLID,2);
SetIndexStyle(3,DRAW_HISTOGRAM,STYLE_SOLID,2);
SetIndexDrawBegin(0,SignalSMA);
SetIndexDrawBegin(1,SignalSMA);
SetIndexDrawBegin(2,SignalSMA);
SetIndexDrawBegin(3,SignalSMA);
IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+2 );
//---- 4 indicator buffers mapping
if(!SetIndexBuffer(0,ind_buffer0) &&
!SetIndexBuffer(1,ind_buffer1) &&
!SetIndexBuffer(2,ind_brighthi) &&
!SetIndexBuffer(3,ind_brightlo) &&
!SetIndexBuffer(4,ind_buffer2) &&
!SetIndexBuffer(5,ind_buffer3))
Print("cannot set indicator buffers!");
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("RainbowOsMA("+FastEMA+","+Slow EMA+","+SignalSMA+")");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Moving Average of Oscillator |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//---- macd counted in the 1-st additional buffer
for(int i=0; i<limit; i++)
ind_buffer3[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i);
//---- signal line counted in the 2-nd additional buffer
for(i=0; i<limit; i++)
ind_buffer2[i]=iMAOnArray(ind_buffer3,Bars,SignalSMA,0,MODE_SMA, i);
//---- main loop
for(i=limit-1; i>=0; i--)
{
res = ind_buffer3[i] - ind_buffer2[i];

// Sort it out now...
if (res < thresh && res > 0) {
ind_buffer1[i] = res;
ind_brighthi[i] = 0;
continue;
} else if (res > 0) {
ind_brighthi[i] = res;
ind_buffer1[i] = 0;
} else if (res > -thresh && res < 0) {
ind_brightlo[i] = 0;
ind_buffer0[i] = res;
continue;
} else if (res < 0)
ind_brightlo[i] = res;
ind_buffer0[i] = 0;
}
return(0);
nandradev is offline   Reply With Quote
 
  




Tags
metatrader, shaun overton

Help InformedTrades grow. Click +1 if you enjoyed this thread.

Register to Comment
Thread Tools Search this Thread
Search this Thread:

Advanced Site Search
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 05:59 PM.


Creative Commons License

InformedTrades is dedicated to empowering traders with knowledge. Learn more about our mission statement, and our charity endeavors.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
vBulletin Optimisation by vB Optimise (Reduced on this page: MySQL 6.25%).
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios