Dukascopy
 
 
Wiki JStore Search Login

Comparing values from previous bars
 Post subject: Comparing values from previous bars Post rating: 0   New post Posted: Tue 04 Mar, 2014, 15:53 
User avatar

User rating: 0
Joined: Thu 27 Feb, 2014, 23:28
Posts: 4
Location: Ireland, DUBLIN
I'm working with VJF only few days and I'm very impressed. Great tool guys, keep going! I'm trying to translate my few old ideas into strategies in VJF(and some of them are easy and some not).

Now I have some problems with comparing values. I use BBands and want to catch moments when price reverse on lower and upper bands in special way:
- previous Open must be lower than Upper Band and previous Close must be higher than Upper Band
- last Open must be higher than Upper Band and previous Close must be lower than Upper Band,

and I'm using "GetHistoricalCandle" and shifted BBands to get previous values of prices and BBands values, but it seems not working. Is there diffrent way to do this?

I'm attaching file with strategy, hope you can help and give me some advice. I've aded some notes not only about BBand case, but also about checking if I have open position (there is also something wrong).


Attachments:
WalterWhite.vfs [64.59 KiB]
Downloaded 93 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: Comparing values from previous bars Post rating: 0   New post Posted: Tue 08 Apr, 2014, 09:46 
Visual JForex expert at Dukascopy
User avatar

User rating: 27
Joined: Fri 03 May, 2013, 18:25
Posts: 366
Location: GermanyGermany
Greetings!

Apologies for the delayed answer!

When reviewing your strategy you are using more conditions as you have described above. You can program it much more easier...
If you send me the whole strategy conditions I will create that for, if you like :)

I have attached the component for your description with assuming that
Quote:
previous Open must be lower than Upper Band and previous Close must be higher than Upper Band
means shift=2 and
Quote:
last Open
means shift=1. But while I tried to find an example for that I did not find anything. Probably you meant "last Open[..] and last Close


The conditions i made:
One chain:
prevOp < upperPrev
prevClose < upperPrev

second chain:
lastOp > lastUpper
prevClose < lastUpper

So right now I strongly believe that you meant something else...

Cheers


Attachments:
WalterWhite_mod.vfs [33.78 KiB]
Downloaded 96 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.
 

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