Convert Dollar into Pips

Post Reply
deejoy
Posts: 6
Joined: Sun Mar 09, 2014 12:09 pm

Convert Dollar into Pips

Post by deejoy »

Hi,
i am realy new and need Help.

How can i convert Dollar into pips. I want to know how many Pips I need vor 8$ for example in EUR/JPY.

Can anyone help me ?
Thx
User avatar
macman
Trader
Posts: 118
Joined: Tue Nov 15, 2011 7:47 pm
Location: Somewhere on a European waterway, on my classic (old) Dutch barge

Convert Dollar into Pips

Post by macman »

Welcome to the forum.

If you are really new to all this, maybe start out with one of the excellent free online courses like http://www.babypips.com/school ?

Much of the material here assumes you have a good basic knowledge before dipping in.

Best of luck :good:
This account takes ALL software generated trade calls from my FXW training course and is used to develop money management routines.
http://www.mt4i.com/mt4ichart.aspx?c=ch ... udent-demo
deejoy
Posts: 6
Joined: Sun Mar 09, 2014 12:09 pm

Convert Dollar into Pips

Post by deejoy »

Hi macman,

i am new in programing mql4 not in trading.
I need a Code snippet
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Convert Dollar into Pips

Post by milanese »

this should do what you want

Code: Select all

double tickvalue = MarketInfo(symbol, MODE_TICKVALUE);
    double point     = MarketInfo(symbol, MODE_POINT);
    double ticksize  = MarketInfo(symbol, MODE_TICKSIZE);
// fix for very rare occasion that a change in ticksize causes a tickvalue change
    double real_tickvalue = tickvalue * point / ticksize;           
    double lotsize   = MarketInfo(symbol, MODE_LOTSIZE);
    double PipsOfUSDvalue = USD_VALUE / (	OrderLots() *lotsize* real_tickvalue );
Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
deejoy
Posts: 6
Joined: Sun Mar 09, 2014 12:09 pm

Convert Dollar into Pips

Post by deejoy »

thx
deejoy
Posts: 6
Joined: Sun Mar 09, 2014 12:09 pm

Convert Dollar into Pips

Post by deejoy »

@milanese

On 5 Digit Pairs (EUR/USD,GBPCAD) all would be fine i get 0,0040 but on 3 Digit Pairs (CAD/JPY, EUR/JPY) something is wrong there i get 0,0040 too but it must be 0,04. How can i fix that ?
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Convert Dollar into Pips

Post by milanese »

deejoy » Tue May 13, 2014 1:50 pm wrote:@milanese

On 5 Digit Pairs (EUR/USD,GBPCAD) all would be fine i get 0,0040 but on 3 Digit Pairs (CAD/JPY, EUR/JPY) something is wrong there i get 0,0040 too but it must be 0,04. How can i fix that ?
in adding a multiplier for JPY pairs...

Cheers :)

Tommaso
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
Post Reply

Return to “Coders Hangout”