|
How to limit one position per candle? |
Ivory
|
Post subject: How to limit one position per candle? |
Post rating: 0
|
Posted: Sun 26 Jul, 2015, 17:45
|
|
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.
|
|
|
|
 |
vadim_berezhnoj
|
Post subject: Re: How to limit one position per candle? |
Post rating: 0
|
Posted: Mon 27 Jul, 2015, 16:58
|
|
Visual JForex expert at Dukascopy |  |
User rating: ∞
Joined: Mon 22 Apr, 2013, 11:30 Posts: 604 Location: UkraineUkraine
|
Hello
You should use onCandle method for that purposes.
|
|
|
|
 |
Ivory
|
Post subject: Re: How to limit one position per candle? |
Post rating: 0
|
Posted: Wed 29 Jul, 2015, 21:19
|
|
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.
|
|
|
|
 |
vadim_berezhnoj
|
Post subject: Re: How to limit one position per candle? |
Post rating: 0
|
Posted: Tue 18 Aug, 2015, 17:23
|
|
Visual JForex expert at Dukascopy |  |
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.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|