|
MACD system bug |
bmvajta
|
Post subject: MACD system bug |
Post rating: 0
|
Posted: Tue 14 Jul, 2015, 23:59
|
|
User rating: 0
Joined: Fri 12 Jul, 2013, 12:21 Posts: 57
|
Good evening,
I have an issue with a simple system. The system checks the trend based on two SMA's, whenever the trend is down, only short signals are taken and vice versa. The signal occurs when the MACD lines are crossing. No SL and no PT only an exit signal when the MACD lines cross again.
Now it seems that the system is NOT opening a position on all signals. Can you check if I did something wrong perhaps or there is a system bug?
thank you in advance,
Balazs
|
|
|
|
 |
bmvajta
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Wed 15 Jul, 2015, 00:00
|
|
User rating: 0
Joined: Fri 12 Jul, 2013, 12:21 Posts: 57
|
I can not upload the .VFS file. Is there any way I can email it?
|
|
|
|
 |
bmvajta
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Wed 15 Jul, 2015, 12:04
|
|
User rating: 0
Joined: Fri 12 Jul, 2013, 12:21 Posts: 57
|
This is the message I receive if I want to upload the file:
"Sorry, the board attachment quota has been reached."
any ideas?
|
|
|
|
 |
amine_chourou
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Thu 16 Jul, 2015, 09:59
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi ! Please send your strategy by email to [email protected] and address it to me, I'll check this and keep you posted Meanwhile, I checked the MACD indicator output variables and it is working fine. Thanks
|
|
|
|
 |
bmvajta
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Fri 17 Jul, 2015, 18:40
|
|
User rating: 0
Joined: Fri 12 Jul, 2013, 12:21 Posts: 57
|
Thanks for reviewing Amin,
Well, on this chart I see two double MACD lines, whereas there should only be one MACD. Is that perhaps the reason? In my backtest in visual Jforex some MACD crosses (fast line crossing the signa line), does NOT result in a trade.
This is my main problem... Was this any help to you?
|
|
|
|
 |
bmvajta
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Mon 20 Jul, 2015, 09:38
|
|
User rating: 0
Joined: Fri 12 Jul, 2013, 12:21 Posts: 57
|
Unfortunately that is not solving the problem. Like I described. I need to enter a position when the MACD lines cross. I need a shift for that don't I? To check if for example the MACD line is below the signal line 1 time unit back. Then in the present I check if the MACD line is above the signal line. That is how a cross can be defined in Jforex, am I correct? To put it simply: I can not figure out, how I can enter a position when the MACD lenitive crossed. That is what I need help with  thanks again 
|
|
|
|
 |
amine_chourou
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Mon 20 Jul, 2015, 10:35
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi,
Sorry, I deleted my previous posts as they are not relevant with regards to your question. Let me explain more: The shift value is used to check whether a line is moving up or down by comparing the current value to a previous value. Or to check if a given cross happens as you described: Current value A greater than current value B AND previous value A less than previous value B <-- This method is very precise to detect the cross event and I recommend to use a shift 2 instead of 1 . but in the meantime you can detect a cross by a simple comparison as such: Current value A greater than current value B
|
|
|
|
 |
amine_chourou
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Mon 20 Jul, 2015, 10:52
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
|
|
|
 |
bmvajta
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Mon 20 Jul, 2015, 11:28
|
|
User rating: 0
Joined: Fri 12 Jul, 2013, 12:21 Posts: 57
|
Thank you Amin, This seems to be working great! I just don't understand why the "not equal to" out put of the if function (with the default time period) shall result in a closing of the positions.. I have to figure that out, as I don't understand that logic.. But any how, this seems to be working.. Now I will try to program the sell side as well. About the other strategy, I posted here (that is THE important strategy to me), I emailed it to you last week. Did you get it? That is going to be the tough one to crack. If you manage to help me, I buy you a beer when I am in geneva  Thanks again..
|
|
|
|
 |
amine_chourou
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Mon 20 Jul, 2015, 16:54
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi there,
I received your email, I'll check this asap
For the non equal output : IF the period is equal to the one we set then the flow will go through otherwise the flow will go through ANY of the periods available (10 sec / 1 mn / 5mn etc ...) i.e the minimum time 10 sec ... this is a way to work on 10 sec basis when required and to ovoid using "tick" start point for example
|
|
|
|
 |
bmvajta
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Tue 21 Jul, 2015, 11:15
|
|
User rating: 0
Joined: Fri 12 Jul, 2013, 12:21 Posts: 57
|
Hi Amin, My other topic disappeared from the forum here about my other strategy (the cross and recross of the 7EMA line with a MACD as a direction indicator!). IS that the strategy you referred to yesterday you received it? I am not able to getting it to work 
|
|
|
|
 |
amine_chourou
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Tue 21 Jul, 2015, 15:56
|
|
Visual JForex expert at Dukascopy |  |
User rating: 288
Joined: Thu 18 Apr, 2013, 09:26 Posts: 1496 Location: Switzerland, Geneva
|
Hi there, I've deleted it by mistake but as I already get your description by email I'm attaching the file as per your description: " Quote: Dear Amin,
I am stuck with another strategy as well… I am missing something in my Logic and I can not find a way to fix it.
What I am trying to do is this:
standard MACD settings EMA 7.
Wheneever the MACD Hist is below 0 and the candle crosses the EMA line and closes above and then recross it down again and closes below the EMA 7 (does not have to be the exact next candle, can also be 2 or 3 later als long as the MACD is still down), then I open a position upon the open of the next bar (the one after the bar closed below the EMA line).
A long position is via versa, but I have not programmed that into the file yet.
About the stop loss. It is put 1 pip above the highest high of the past 5 candles. The PT is 1,5 times the Stoploss amount (so the SL - the entry price, when going short and the entry price - the SL when going Long).
Can you help me?
Balazs Please test this example and let me know your feedback Cheers
Attachments: |
Sample2.vfs [41.83 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.
|
|
|
|
|
 |
bmvajta
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Wed 22 Jul, 2015, 07:15
|
|
User rating: 0
Joined: Fri 12 Jul, 2013, 12:21 Posts: 57
|
Good Morning Amin, This seems to be working fine. THANKS!!  Now comes the hard part. I need this strategy to work with RANGE BARS. Range bars are candles they are formed as a function of price not a function of time. So if I set the Range Bar at 8 pips, one bar (or candle) will form every time there is an 8 pip movement in price. So lets assume price is fluctuation between 1.0100 and 1.0107 for an hour. In that case only 1 range bar is forming (as the 8 pips have not been exceeded , whereas if I would use normal 10 minute candles there would be of course 6 candles formed. If you want to know more about this: https://www.investopedia.com/articles/tr ... t-view.aspSo, bottom line is, that the strategy sample you have made is working fine, but I need to implement range bars, so the cross and recross of the EMA7 line is happening by range bars. I hope you like this challenge  I am looking for a week now in visualJforex and can;t find a solution for it! greetings, Balazs
|
|
|
|
 |
Cloaked_Wixard
|
Post subject: Re: MACD system bug |
Post rating: 0
|
Posted: Wed 12 Aug, 2015, 16:43
|
|
User rating: 0
Joined: Wed 12 Aug, 2015, 16:41 Posts: 3 Location: MalaysiaMalaysia
|
Hi,
I was wondering whether the MACD histogram can be coded with colors? I am used to seeing it red and green
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|