terminological questions concerning lot size and related things

 
Hello,

I am relatively new to Forex trading, but not to programming.

I just started to write a few programs in order to understand some
concepts of Forex trading better and in order to be able to backtest
some of my ideas. You might consider the following issues to be
insignificant, because they are of a purely terminological
nature. Yet, I would appreciate any explanations very much, because,
on one hand, they would help me to understand Forex better, and, one the other
hand, they would help me to write code that is much easier to reuse
and share.

I am implenting strategy objects that have certain properties such as

max_positions: maximum number of open positions
take_profit: number of positive pips at which positions are closed to take the profit
stop_loss: number of negative pips at which positions are closed to avoid further losses
...

There are two properties I have certain terminological problems
with. At the moment, I call them 'lot_size' and 'percent_of_equity'.

I do not like the word "lot size", because it seems that you can never
be sure about its meaning. For some brokers one lot is 100000 units of
some currency, for some it is 10000 units. Some have accounts of type
A where one lot is different from one lot in accounts of type
B. The situation is not improved by introducing terms such as mini lot
and micro lot, because these terms also mean different things depending on
broker and account type. Therefore, I would like to simply understand by "lot size"
the number of units of a currency that is used in a trade. I.e. if
lot_size=1000, then 1000 pounds are sold and a corresponding amount of
dollars is bought in a 'SELL GBP/USD, lot_size=1000' trade. Yet, this
is not the standard way of using the term 'lot size'.

What would be a better word to use instead of 'lot size'? Is there
perhaps a commonly accepted term for this?

I also want my strategy objects to have a property 'percent of equity'.
I think it is much more interesting for a backtest, if the
amount of money used for trades depends on the current equity than if
always the same amount of money is used. (When you double your equity,
you might want to also double your lots). Apart from this, it would be
strange to say that using $1000 for each trade is one of several
principles that together make up a strategy. What may be part of a
strategy is how much money you use for each trade in relation to your
equity or balance.

In my program, 'SELL GBP/USD percent_of_equity=10' would mean that 10 percent
of the current equity are used for the trade. ("Used", not risked).
I.e. if the current equity is $10000, then pounds are sold and dollars
are bought for the equivalent of $1000.

What would be a better word to use instead of the completely arbitrary
'percent of equity'? Is there perhaps a commonly accepted term for this?

Dobrek

 

I don't think you need to worry about the distinction between different "lots" . . . you can get it, MarketInfo() and MODE_LOTSIZE if you really need it.

Regarding "percent of equity", are you really talking about "percent of free margin" ?

 
RaptorUK:

I don't think you need to worry about the distinction between different "lots" . . . you can get it, MarketInfo() and MODE_LOTSIZE if you really need it.

Regarding "percent of equity", are you really talking about "percent of free margin" ?


I am not yet writing my program in MSQL. And even when I start using MSQL, I will want the general design of my program and my thinking to be independent of contingent features of MSQL.

Concerning "percent of free margin": Yes, it would probably be better to think in terms of free margin than in terms of equity. But "percent of free margin" still looks quite arbitrary. If you don't know a program and see this term for the first time, you will probably not know what it is supposed to mean.

At the moment, I am not having programming problems. The first versions of my current programs behave exactly as I expect them to. I am having conceptual and terminological problems. I am trying to use terms that are as close as possible to the language that is generally used in Forex programming.

 
MSQL ? MySQL ? if you want to use terms generally used in the type of Forex Programming prevalent in this Forum then it makes sense to use terms used in mql4 . . . so Percent of Free Margin makes complete sense . . .
 
dobrek:

In my program, 'SELL GBP/USD percent_of_equity=10' would mean that 10 percent
of the current equity are used for the trade. ("Used", not risked).

This is backwards. Contract Size - MQL4 forum

 

IMO, most people would adopt a unique definition of the terms used. Their acceptance usually depends on a) how they were taught the first time; b) an analogy which made it easier to understand the terms. c) etc. This is a particular problem when trying to built EA's for the masses. But who cares anyways? If I would ever program something for the masses, it'll be much easier to just tell the user what I mean by Lot_Size. This could be done using extern comments or in line comments etc.

The standard_lot vs lot_size. I've adopted that a standard_lot is equal to 100k of the base currency. If a broker choose to term their 10k=1_lot as standard_lot, who cares? At the end of the day, all I wanna know is how much the money is worth. If one bank told me I needed 100k to open a standard_saving_account; while another told me I needed 10k to open a standard_saving_account; and all I had in my pocket was 10k, It's pretty easy to figure out which bank I could open an account with irrespective of the standard term they're using.

Instead of looking at those types of broker as standard_lot brokers when they're running 10k=1_lot. I just look at them as a mini_account broker. Yeah I know some of these brokers market these accounts as standard accounts but that's just to confuse the noobs.

And lastly "percent of equity" or "percent of free margin" who cares? If I had a choice, I'd call it "percent of bankroll" lol. So I guess you should probably call it "percent of free margin" around here even though saying "percent of equity" would be easier for a noob to understand. I know when I was new and someone said "percent of free margin", I started to panic about having to calculate leverage and margins and lord knows what else.

 
RaptorUK:
MSQL ? MySQL ? if you want to use terms generally used in the type of Forex Programming prevalent in this Forum then it makes sense to use terms used in mql4 . . . so Percent of Free Margin makes complete sense . . .

Sorry, should have been mql. (I suppose and hope the terminology will be more or less the same in mql4 and mql5.)
 
WHRoeder:

This is backwards. Contract Size - MQL4 forum


What do you mean by "this is backwards"?

 


Thanks for all the comments so far. I think I will use percent_of_free_margin or percent_of_free_margin_used_for_each_trade. But I am still searching for a term that can be used to refer to a fix amount of money that is used for each trade. Neither "lot size" nor "lot" nor "contract size" has this meaning (apart from the fact that all these terms are highly ambiguous and unclear). I am getting the impression that there is no such term in Forex language.
 
dobrek:

Thanks for all the comments so far. I think I will use percent_of_free_margin or percent_of_free_margin_used_for_each_trade. But I am still searching for a term that can be used to refer to a fix amount of money that is used for each trade. Neither "lot size" nor "lot" nor "contract size" has this meaning (apart from the fact that all these terms are highly ambiguous and unclear). I am getting the impression that there is no such term in Forex language.

Hi dobrek,

Since you relative new to forex, don't judge too fast, you may want to give yourself quite sometime to learn about about forex. There's plenty resources on the net, for example here school section on babypips (http://www.babypips.com/school/).

Maybe what you looking for is MarketInfo() with MODE_MARGINREQUIRED which means Free margin required to open 1 lot for buying.

:D

 

...But I am still searching for a term that can be used to refer to a fix amount of money that is used for each trade....

Fixed_Lot comes to my mind. (Kinda like variable spreads vs fixed spreads). Just don't force a value upon it and you'll be alright. :)

Reason: