Dukascopy
 
 
Wiki JStore Search Login

Subscribing more intruments in Visual Jforex
 Post subject: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Fri 08 Apr, 2016, 11:11 

User rating: 0
Joined: Fri 04 Mar, 2016, 20:55
Posts: 12
Location: PolandPoland
Hi,
how to to subscribe 2 or more instruments in Viusal JForex ( for trading mutipairs in one strategy), there is no problem in Java but can't make this in Visual Jforex.
Thanks
PM


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Fri 08 Apr, 2016, 14:18 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

It depends on the way you want to program your strategy:
- If you have a single logic that you need to apply on an instrument at once, then I recommend you to build your idea based on one instrument then once finished switch the instrument pair.
- If your idea is to have a cross instrument logic (like: IF condition A is verified on EURUSD then BUY EURUSD and SELL USDCHF) then you should use "Get historical candle" with the needed pairs then go ahead with your conditions (attached an example)

Cheers


Attachments:
MultiCurrSample.vfs [33.65 KiB]
Downloaded 152 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: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Fri 08 Apr, 2016, 15:38 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
A fresh example was just treated here:

https://www.dukascopy.com/swiss/english ... 39&t=53871


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Fri 08 Apr, 2016, 19:34 

User rating: 0
Joined: Fri 04 Mar, 2016, 20:55
Posts: 12
Location: PolandPoland
Hi,
Now I see, I'm assuming that Get Historical Candle with Shift=0 is the last candle ?

But if I can run few instances of one strategy on one account with different presets it is not necessary to make that complicated strategy (if I am not make crosstrading) ?

Please confirm that one slot of remote server is assigned per strategy , not per account ?

Bye
PM


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Mon 11 Apr, 2016, 15:53 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
HI,

Quote:
Now I see, I'm assuming that Get Historical Candle with Shift=0 is the last candle ?

Correct

Quote:
But if I can run few instances of one strategy on one account with different presets it is not necessary to make that complicated strategy (if I am not make crosstrading) ?


Correct

Quote:
Please confirm that one slot of remote server is assigned per strategy , not per account ?


Slots are assigned per account and per strategy so if you have 10 slots, you can run up to 10 strategies. Then it is a matter of the server resources to handle each strategy requirements in terms of threads etc ...
Please give me your account ID so that I can check the available slots

Cheers


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Wed 04 May, 2016, 18:48 

User rating: 0
Joined: Fri 04 Mar, 2016, 20:55
Posts: 12
Location: PolandPoland
Hi,
thanks for previous answers. Now I need some advice from You.

I need Normalized RSI indicator. Equanation looks simple : %RSI= (RSI- Lower Band RSI)/(Upper Band RSI - Lower Band RSI).
Of course I can wrote is as indicator in Java JDK, but I need put this in Jforex Visual and run it on remote server.
Do I really need to wrote a custom indicators like this normalized RSI in Visual Jforex via basic blocks ?
Have You any idea how to make more simple and fast ?

Thanks
Pem


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Thu 05 May, 2016, 11:57 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

This looks quite simple and requires a calculation block to be filled with your formula inputs and it is the only way to insert such customized indicator in VJF.

Cheers


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Thu 05 May, 2016, 15:04 

User rating: 0
Joined: Fri 04 Mar, 2016, 20:55
Posts: 12
Location: PolandPoland
Hi,
this is not quite simple because BBands indicator only takes as input data price . I need RSI value as input data. This is not possible at VJF.
I'm assuming that all indicators at VJF can takes as input price or volume.
Thanks any way.
Pem


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Thu 05 May, 2016, 16:20 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Well, as your previous post was missing essential details (BBands) I completely misunderstood the requirement
Quote:
Upper Band RSI - Lower Band RSI)

Though you were referring to the RSI levels but it is not the case;
Could you provide a concrete formula for your need ?


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Thu 05 May, 2016, 16:55 

User rating: 0
Joined: Fri 04 Mar, 2016, 20:55
Posts: 12
Location: PolandPoland
Hi,
to simplicity my question: I need BBands or SMA with RSI value as input.
Thanks


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Thu 05 May, 2016, 17:07 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
I did the other way around while waiting for your answer:
An RSI with BBands inputs with daily period, the attached is a simple example not tested but for brainstorming purpose, so feel free to modify / correct it.
Cheers


Attachments:
RSI_Norm.vfs [29.3 KiB]
Downloaded 125 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: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Thu 05 May, 2016, 17:36 

User rating: 0
Joined: Fri 04 Mar, 2016, 20:55
Posts: 12
Location: PolandPoland
Hi,
Thanks , yours script gave me general idea how to make it.
But I have one last question.
If you shifted on each daily candle BBands for +1 value (backwards of course) than You get instant value of BBands for the first day ?


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Fri 06 May, 2016, 08:59 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

The shift value increments every day to get the previous value date, this means that the strategy need to run 5 daily candles onwards to get the 5 previous values at the very first launch, then it will be updated accordingly as it shifts forwards and the RSI gets updated.
You can still remove the period filter or reduce the this period from 1 day to 5 mn and keeping the BBand period working with daily period: you'll get then then value of the daily BBands every 5 mn but in the meantime, the shift will move faster and you'll get your 5 previous BBands values after 25mn only. Indeed, the counter will be reset and you'll get the same RSI every 25mn till the day is over and a new daily candle starts.


 
 Post subject: Re: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Fri 06 May, 2016, 10:50 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

Just noticed couple of errors in my previous example: corrected version attached.


Attachments:
RSI_Norm2.vfs [29.34 KiB]
Downloaded 120 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: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Fri 06 May, 2016, 13:18 

User rating: 0
Joined: Fri 04 Mar, 2016, 20:55
Posts: 12
Location: PolandPoland
Hi,
opposite direction (BBands on RSI) is more harder to coding due complicated formulas of SMA with deviation (used in BBands) of course +normalizing formula of RSI.
Take a look at attachment.
I stucked on very simple problem. I need sum of RSI from a last 200 candles. Take a look to my script. You see my intention and what happened.
Thanks very mutch for helping till time.

Pem


Attachments:
SMA with DEV.pdf [22.21 KiB]
Downloaded 119 times
N_RSI.vfs [23.25 KiB]
Downloaded 129 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: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Tue 10 May, 2016, 10:49 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

I see what you need.
The problem with working with shift in such cases is that you need to "wait" 200 periods (sec, mn, hours or even days) to collect all the RSI's and then sum up which is not efficient as a method.
I think in your case, you need to calculate the RSI on your own and use the loop viewer to retrieve instantly 200 periods in one flow.
I've made an example but I'll let you double check the accuracy of the calculations.
I've made this based on :

RSI = 100 - 100/(1 + RS*)
*Where RS = Average of x days' up closes / Average of x days' down closes.


Hope this helps ..


Attachments:
RSI_Tests.vfs [31.56 KiB]
Downloaded 135 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: Subscribing more intruments in Visual Jforex Post rating: 0   Post Posted: Fri 13 May, 2016, 09:10 

User rating: 0
Joined: Fri 04 Mar, 2016, 20:55
Posts: 12
Location: PolandPoland
Hi,
I make it at last weekend using GetHistoricalCandels and 2xLoopViewer. And it's working of course with very poor perfomance. But due limitations in VJF (especially at debuging, can't display custom indicator on chart) I decide to switch my strategies to Java direct coding.
Thanks for Yours effort.
Pem


 

Jump to:  

  © 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