Dukascopy
 
 
Wiki JStore Search Login

How to limit one position per candle?
 Post subject: How to limit one position per candle? Post rating: 0   New post Posted: Sun 26 Jul, 2015, 17:45 
User avatar

User rating: 0
Joined: Thu 01 May, 2014, 08:08
Posts: 5
Location: RomaniaRomania
Hi. I have the following programming problem: my strategy runs with onTick and it has the take profit and stop loss at, let's say, 10 pips. It triggers the position after the candle close on the next candle, but after the next candle touches the TP or SL another position is opened after that. What I need to do is to open just that first position and then wait the next candle to open another position again. Can anyone help me? Thanks.


 
 Post subject: Re: How to limit one position per candle? Post rating: 0   New post Posted: Mon 27 Jul, 2015, 16:58 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
Hello

You should use onCandle method for that purposes.


 
 Post subject: Re: How to limit one position per candle? Post rating: 0   New post Posted: Wed 29 Jul, 2015, 21:19 
User avatar

User rating: 0
Joined: Thu 01 May, 2014, 08:08
Posts: 5
Location: RomaniaRomania
Wouldn't it wait for the next candle close if I do that? Because that's exactly what I do not want, because it needs to touch by tick the take profit level. For example: The position is opened at 100, TP at 102; if I do the onCandle call, the next open might be at 99, which closes the position on loss. But the high of that candle could be 103, which should trigger the TP. Also after it does that, I need not to open anymore positions until the next candle. I hope you can reply. thank you.


 
 Post subject: Re: How to limit one position per candle? Post rating: 0   New post Posted: Tue 18 Aug, 2015, 17:23 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
Greetings.

Please provide strategy and proper description of the problem to fix.

Best regards, Support Team.


 

Jump to:  

  © 1998-2024 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