Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

MQL 4/5 function on JForex. Need help.
 Post subject: MQL 4/5 function on JForex. Need help. Post rating: 0   New post Posted: Sun 07 Aug, 2011, 00:39 

User rating: 0
Joined: Sat 06 Aug, 2011, 23:17
Posts: 27
Location: Russian Federation,
Hi all, i`am from Russia, i have some question about Jforex.

1) In mql4/5 have more parameters for indicator CCI (Commodity Channel Index - https://codebase.mql4.com/255)

In mql4/5 this indicator write this - double iCCI(string symbol, int timeframe, int period, int applied_price, int shift)
(https://docs.mql4.com/indicators/icci) iCCI(NULL, PERIOD_H1, period, PRICE_TYPICAL, 1);

IIndicators indicators;
Instrument instrument;
....
this.indicators = context.getIndicators();
....
In JForex write this - indicators.cci(instrument, Period.ONE_HOUR, OfferSide.BID, period, 1);

I need in https://docs.mql4.com/constants/prices - PRICE_TYPICAL (Typical price, (high+low+close)/3.)

How to realize PRICE_TYPICAL in JForex for indicator CCI

2) In MQL4/5 have Digits - https://docs.mql4.com/predefined/variables/digits and this https://docs.mql4.com/common/MarketInfo

For EURUSD pair digits = 5 (if point 0.00001). If point 0.0001 digits = 4. For USDJPY digits = 3.

In Jforex have function int getPipScale(). What this function return for EURUSD?

I need analog for mql4/5 Digits.

3) In MQL4/5 have function AccountFreeMargin() - https://docs.mql4.com/account/accountfreemargin
I need analog for Jforex.

4) Time Open and Time Close order. How to realize this function in Jforex.

I thank for the help.

in Russian

Заранее благодарю за помощь ;)


 
 Post subject: Re: MQL 4/5 function on JForex. Need help. Post rating: 0   New post Posted: Mon 08 Aug, 2011, 08:20 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Pirate wrote:
1) In mql4/5 have more parameters for indicator CCI (Commodity Channel Index - https://codebase.mql4.com/255)

In mql4/5 this indicator write this - double iCCI(string symbol, int timeframe, int period, int applied_price, int shift)
(https://docs.mql4.com/indicators/icci) iCCI(NULL, PERIOD_H1, period, PRICE_TYPICAL, 1);

IIndicators indicators;
Instrument instrument;
....
this.indicators = context.getIndicators();
....
In JForex write this - indicators.cci(instrument, Period.ONE_HOUR, OfferSide.BID, period, 1);

I need in https://docs.mql4.com/constants/prices - PRICE_TYPICAL (Typical price, (high+low+close)/3.)

How to realize PRICE_TYPICAL in JForex for indicator CCI
See: viewtopic.php?f=65&t=30857
Pirate wrote:
2) In MQL4/5 have Digits - https://docs.mql4.com/predefined/variables/digits and this https://docs.mql4.com/common/MarketInfo

For EURUSD pair digits = 5 (if point 0.00001). If point 0.0001 digits = 4. For USDJPY digits = 3.

In Jforex have function int getPipScale(). What this function return for EURUSD?

I need analog for mql4/5 Digits.
It acts the same as your mentioned digits function - it returns the number of decimal places of one pip for the particular instrument.
Pirate wrote:
3) In MQL4/5 have function AccountFreeMargin() - https://docs.mql4.com/account/accountfreemargin
I need analog for Jforex.
See: https://www.dukascopy.com/client/javadoc//com/dukascopy/api/IAccount.html#getCreditLine()
Pirate wrote:
4) Time Open and Time Close order. How to realize this function in Jforex.
See:
https://www.dukascopy.com/client/javadoc ... CloseTime()
and
https://www.dukascopy.com/client/javadoc ... ationTime()


 
 Post subject: Re: MQL 4/5 function on JForex. Need help. Post rating: 0   New post Posted: Tue 09 Aug, 2011, 17:56 

User rating: 0
Joined: Sat 06 Aug, 2011, 23:17
Posts: 27
Location: Russian Federation,
Thanks for help.


 
 Post subject: Re: MQL 4/5 function on JForex. Need help. Post rating: 0   New post Posted: Fri 12 Aug, 2011, 23:29 

User rating: 0
Joined: Sat 06 Aug, 2011, 23:17
Posts: 27
Location: Russian Federation,
If


public Instrument instrument = Instrument.EURUSD;

...
    public double digits() throws JFException {
   
        return instrument.getPipScale() ;
    }



that return digits() ? 4 ? 5 ? or another value ? And that return for instrument = Instrument.USDJPY;


 
 Post subject: Re: MQL 4/5 function on JForex. Need help. Post rating: 0   New post Posted: Sat 13 Aug, 2011, 07:27 

User rating: 0
Joined: Wed 08 Jun, 2011, 10:19
Posts: 29
Location: North Pole
//JForex API 2.6.38
Pirate wrote:
that return digits() ?
4
Pirate wrote:
that return for instrument = Instrument.USDJPY
2


 
 Post subject: Re: MQL 4/5 function on JForex. Need help. Post rating: 0   New post Posted: Mon 22 Aug, 2011, 04:52 

User rating: 0
Joined: Mon 22 Aug, 2011, 04:45
Posts: 1
Location: Russian Federation,
In MQL4/5 have MarketInfo(Symbol(),MODE_MINLOT) - https://docs.mql4.com/common/MarketInfo
It function return Minimum permitted amount of a lot.

I need analog for Jforex.

I thank for the help.


 
 Post subject: Re: MQL 4/5 function on JForex. Need help. Post rating: 0   New post Posted: Mon 22 Aug, 2011, 11:03 

User rating: 0
Joined: Sat 06 Aug, 2011, 23:17
Posts: 27
Location: Russian Federation,
Лучше задай вручную, так как и так понятно какой тут мин лот - 0.001.

Если что напиши мне в Skype^fxmania.ru, я тебе скину функцию мм.


 
 Post subject: Re: MQL 4/5 function on JForex. Need help. Post rating: 0   New post Posted: Mon 22 Aug, 2011, 13:23 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
See:
https://jforex-wiki.site.dukascopy.com/w ... er_Amounts


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com