Dukascopy
 
 
Wiki JStore Search Login

Please help with Ichimoku strategy
 Post subject: Please help with Ichimoku strategy Post rating: 0   New post Posted: Thu 28 Sep, 2017, 14:19 

User rating: 0
Joined: Thu 28 Sep, 2017, 14:11
Posts: 2
Location: United StatesUnited States
Hi,

Please give some tips why my strategy isn't working. I tried all ideas I could have come up with.
All I want is to go short when the Ichimoku cloud is red and when Kijun line is below Tenkan. Then exit when Kijun line is above Tenkan line.

Thank you.


Attachments:
DocDowIchimoku_Help.java [16.15 KiB]
Downloaded 131 times
DocDowIchimoku_Help.vfs [59.9 KiB]
Downloaded 117 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: Need help with Ichimoku strategy - exit doesn't work Post rating: 0   New post Posted: Fri 29 Sep, 2017, 14:31 

User rating: 0
Joined: Thu 28 Sep, 2017, 14:11
Posts: 2
Location: United StatesUnited States
Hi,
Please help with a very simple Ichimoku strategy.
A short entry should happen when the cloud is Red and Kijun(2) is below Tenkan(9) line.
The exit is when Kijun crosses above Tenkan.

In the attached strategy the exit doesn't work at all.
Any ideas why?


Attachments:
DocDowIchimoku_Help.vfs [59.9 KiB]
Downloaded 118 times
DocDowIchimoku_Help.java [16.15 KiB]
Downloaded 117 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: Please help with Ichimoku strategy Post rating: 1   New post Posted: Tue 03 Oct, 2017, 10:52 
Visual JForex expert at Dukascopy
User avatar

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

Sorry for the delayed answer.

The reason of non exit is explained by the following block:

Image

The variable "pos" doesn't have neither static value nor dynamic: so the system is interpreting this as an unknown value and comparing it with 0 is simply impossible. Therefore the exit is blocked.

Besides, I noticed the use of OnTick method while you seems to want to trade on 15mn candles. I've changed that in the attached version. Also, there is a redundancy when checking the number of open positions...So I removed the additional IF

Cheers !


Attachments:
IFBlock.JPG [89.01 KiB]
Downloaded 254 times
DocDowIchimoku_Help_V2.vfs [58.55 KiB]
Downloaded 144 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-2024 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