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.

GAP Trading Strategy
 Post subject: GAP Trading Strategy Post rating: 0   New post Posted: Sun 08 Jun, 2014, 01:18 
User avatar

User rating: 1
Joined: Fri 14 Sep, 2012, 02:25
Posts: 57
Location: New Zealand, Christchurch
hi - does anyone have some reliable code for trading the GAP between Friday CLOSE and Monday OPEN ?
I'm having trouble because of course the GetBar method won't take a Filter so I think I have to use GetBars as below:


long prevBarTime = history.getPreviousBarStart(selectedPeriod, history.getLastTick(instrmt).getTime());
List<IBar> prevBar = history.getBars(instrmt, selectedPeriod, offerSide, Filter.ALL_FLATS, 1, prevBarTime, 0);
double prevBarClose = prevBar.get(0).getClose();
IBar currBar = history.getBar(instrmt, selectedPeriod, offerSide, 0);
double currBarOpen = currBar.getOpen();
double GAP = (currBarOpen - prevBarClose) / instrmt.getPipValue(); // gap in pips


Comments anyone or an example Gap Trading Satregy?


 
 Post subject: Re: GAP Trading Strategy Post rating: 0   New post Posted: Thu 12 Jun, 2014, 08:39 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
See:
https://www.dukascopy.com/wiki/#Market_Hours


 

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