Dukascopy
 
 
Wiki JStore Search Login

Candle Close above Level
 Post subject: Candle Close above Level Post rating: 0   New post Posted: Wed 16 Oct, 2019, 16:20 
User avatar

User rating: 1
Joined: Sun 27 Apr, 2014, 02:32
Posts: 27
Location: Switzerland, Zürich
Hi there,

I try to create a simple strategy based on a bullish fractal signal.

So far the strategy opens a buy position when the price crosses the high of the fractal (shift3).

But I need the strategy to open a buy position only when the first of the following candles closes above the shift3 level.

I searched the forum and tried many different variations but I can't figure out how to do it.

Does anybody know how that works?

Cheers :)

Oli


Attachments:
FractalBUY.vfs [60.13 KiB]
Downloaded 7 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Candle Close above Level Post rating: 0   New post Posted: Mon 21 Oct, 2019, 16:53 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 535
Location: Ukraine, Kiev
Hello.

The logic of the strategy is unclear. Drawing chart pictures might to describe it.

As I guess strategy will need to identify the fractal and save its level to the variable. then check every new candle close to cross it.

Kind regards, Support Team.


 
 Post subject: Re: Candle Close above Level Post rating: 0   New post Posted: Tue 22 Oct, 2019, 09:33 
User avatar

User rating: 1
Joined: Sun 27 Apr, 2014, 02:32
Posts: 27
Location: Switzerland, Zürich
Hello

Yes you guessed it right. That is exactly what I try to do.

Identify the fractal and save its level to the variable. then check every new candle close to cross it.

The first part works fine. I can identify the Fractal Level (in my case shift3 candle high). I could assign it to the variable.
But then I don't know what blocks or commands I need to use to trigger a trade on a new candle that closes above the level.

The close above the level would be the entry point.

Cheers.

Oli


 
 Post subject: Re: Candle Close above Level Post rating: 0   New post Posted: Tue 22 Oct, 2019, 09:58 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 535
Location: Ukraine, Kiev
Strategy should process it on next onCandle event.
Please use the manual to learn Visual JF


 
 Post subject: Re: Candle Close above Level Post rating: 0   New post Posted: Tue 22 Oct, 2019, 23:39 
User avatar

User rating: 1
Joined: Sun 27 Apr, 2014, 02:32
Posts: 27
Location: Switzerland, Zürich
Hello again

And how can I implement next OnCandle?

I have been trough the manual several times and I spent many many hours learning VJF.
As you can see in the attached file I am able to create a working strategy.
It even perfomes pretty good in the right market conditions.

But I cant solve the problem mentioned above. I need an explanation.

Can anybody please give me support?

Cheers.

Oli


 
 Post subject: Re: Candle Close above Level Post rating: 0   New post Posted: Thu 24 Oct, 2019, 10:03 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 535
Location: Ukraine, Kiev
Hello.

Please try the solution from file attached.

Kind regards, Support Team.


Attachments:
FractalBUY_v2.vfs [60.62 KiB]
Downloaded 5 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Candle Close above Level Post rating: 0   New post Posted: Fri 25 Oct, 2019, 09:17 
User avatar

User rating: 1
Joined: Sun 27 Apr, 2014, 02:32
Posts: 27
Location: Switzerland, Zürich
Hello

Thank you. Now I understand.
But the strategy now always opens a new position right away after a position has been closed. (Only in bullish direction)

Please have a look at the screenshot of the backtest. (EURUSD M30)
Can you please show me how to fix this.

Cheers

Have a nice weekend. :)

Oli
Image


Attachments:
FractalQuestion.png [93.47 KiB]
Downloaded 30 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Candle Close above Level Post rating: 0   New post Posted: Fri 25 Oct, 2019, 11:58 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 535
Location: Ukraine, Kiev
That happens becouse of SL and TP orders on the opened positions< you can delete that parameters from Market Open block.
Further you need to program conditions for position close.

Kind regards, Support Team.


 
 Post subject: Re: Candle Close above Level Post rating: 0   New post Posted: Sun 27 Oct, 2019, 16:59 
User avatar

User rating: 1
Joined: Sun 27 Apr, 2014, 02:32
Posts: 27
Location: Switzerland, Zürich
Hello again

I don't understand how to do that. Tried for several hours yesterday and today.

I am not a programmer and that is why I like Visual JForex. It gives us the opportunity to
set up a strategy without going into coding.

There must be a way to do it with the sl an tp in the Open Market block.

If you show me how to make this work I will not bother you anymore. ;)


Appreciate your support.

Cheers
Oli


 
 Post subject: Re: Candle Close above Level Post rating: 0   New post Posted: Tue 29 Oct, 2019, 16:24 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 535
Location: Ukraine, Kiev
Hello.

There is no need in programming skills in Visual JF, only trading logic.
You have to add conditions for positions closing.
By now positions are closed by SL or TP.
Try strategy in historical tester and follow strategy logic candle by candle.

Kind regards, Support Team.


 

Jump to:  

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