Dukascopy
 
 
Wiki JStore Search Login

how to realize cycle operation not depend on candle or position?
 Post subject: how to realize cycle operation not depend on candle or position? Post rating: 0   New post Posted: Sun 21 Feb, 2016, 07:48 
User avatar

User rating: 0
Joined: Sat 20 Feb, 2016, 03:54
Posts: 1
Location: China,
Hi There,

I found it is quite difficult to realize a cycle operation as in normal programming:
for (i=0; i<8; i++)
{
operation 1;
operation 2;
....;
}

I am trying to make a strategy using such cycle operation. I judge the trend by sequence of the EMA of different period.
If the 3, 5, 8,10, 12, 15, 30, 35, 40, 50 and 60 days EMA is in raising seuqence or descending squence in all the past 6 candles, a trend is confirmed. I tried to use "IF" block to realize the cycle operation, but system indicates that i have created an endless loop. Can you please kindly help to take a look into my file.

thanks!


Attachments:
BMW006.vfs [67.63 KiB]
Downloaded 153 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: how to realize cycle operation not depend on candle or position? Post rating: 0   New post Posted: Mon 22 Feb, 2016, 16:18 
Visual JForex expert at Dukascopy
User avatar

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

As far as I understood your requirement do not need an incrementation to be achieved: You can use EMA blocks as much as needed with each set to a given period (3,5,8,10,...) and then compare their outputs: for this you need 2 EMA blocks per period to be able to compare 2 outputs in a given period and then conclude whether the trend is going up or down)

In case I misunderstood something, here is the way to set up a basic counter (from 1-->8)

Image


Cheers


Attachments:
Incrementation.JPG [132.79 KiB]
Downloaded 288 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