Re: Gann 2-bars indicator
The indicator repaint !!!!
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Technical Indicators → Gann 2-bars indicator
The indicator repaint !!!!
WHY INDICATORS REPAINTS I HATE THAT WORD grrrrrrrr
Lets assume we use Moving average connecting highs and use 1 period MA to connect highs and lets make an order to buy if MA rise " this means that new high > previous high" so we have two consecutive highs why The MA logic donot repaints !!!!!!! and could we apply that logic to Gann trend indicator to fix it?????
Also i have a strange idea donot know if it Could be coded !!!!
The idea is to break the connection in the gann line when it flip from up to down and from down to up this means the gan line start to connect 1st candle making lower close after the top with the second candle if it make a lower low this will remove the confusion and signals will be right!!!!!
Hi ahmedalhoseny,
Here is first draft. Let me know if this is close to your indicator.
Info:
Gann Line - the Gann Line drawn on chart
Trend Up -- 1 if trend is up; 0 if not
Consolidation -- 1 if no up trend and no down trend;
Trend Down -- 0 if trend is downPeriod - period of the Donchian band, tells if making new highs or lows
Hits -- how many higher highs or lower lows to be up/down trend (eg, 2 -- must be 2 consecutive higher highs)Do you have a version for MT 4 you like? That would be best -- check your MT4 indicator values against my indicator values. If they are the same, good; if the are different, indicator needs more work.
thanks
krog
Great work as always, I like it! I'm playing with it a bit and at times results are concerning, live test will have its final say. I'll update on my findings tomorrow.
Thanks!
ok, I'm going to remove the 21:04:08 post, that is a beta version, don't want people using it before it works well.
Also -- I'm sorry, my mistake. Do not use as Open yet. I forgot to remove it, it does not work yet. Only as Open Filter, after Bar Closing.
For Open, it uses the underlying Donchian Channel indicator.
The indicator repaint !!!!
Hi ahmedalhoseny,
see my attached below, I've added my lines in green. Looking at it, I believe the white bar at 8.29 is the first lower low, and the next black bar is the second lower low. The indicator values expected are:
8.29 0:00 (short white body with long upper shadow, short lower shadow)
Trend Up 0
Consolidation 1
Trend Down 0
8.30 0:00 (longer black body with long lower shadow, short upper shadow)
Trend Up 0
Consolidation 0
Trend Down 1
Again, I'm really sorry for the confusion -- I forgot to take out Open slot before posting, it is not coded yet.
I'm confused now, I didn't find nothing particularly wrong in open.filter, but is something wrong there too?
I'm confused now, I didn't find nothing particularly wrong in open.filter, but is something wrong there too?
Yes -- it's the Donchian Channel Indicator, not the Gann indicator. Example, add Gann, then add Donchian on top with same Period value, the signals will be from the Donchian Channel.
Ex, Logic as "Enter long at the Upper Band" has no meaning in Gann, because it's only one line, not 2 lines for bands.
I figured, be sure it looks correct, get the Open Filter working first, the easy part, then work on the Open - Close filter.
ahmedalhoseny wrote:The indicator repaint !!!!
Hi ahmedalhoseny,
see my attached below, I've added my lines in green. Looking at it, I believe the white bar at 8.29 is the first lower low, and the next black bar is the second lower low. The indicator values expected are:
8.29 0:00 (short white body with long upper shadow, short lower shadow)
Trend Up 0
Consolidation 1
Trend Down 08.30 0:00 (longer black body with long lower shadow, short upper shadow)
Trend Up 0
Consolidation 0
Trend Down 1Again, I'm really sorry for the confusion -- I forgot to take out Open slot before posting, it is not coded yet.
Now I get it, at first I looked it's not right (before testing began), but then I think I figured it out - look Krog, signal is actually in the right place, take the highest high candle (white) and compare its low to the next candle's low, it isn't a repaint or a wrong signal, I think that's the way it should be, otherwise there's a 1 bar lag and I personally hate lag By definition it's not wrong, can Krog and Ahmed agree with me on this?
I think the Gann line should continue to the top of 8.29, the white bar. High[8.29] is higher than High[8.28] (the white bar), and up trend was in place.
Ok, I got the indi do the straight-up-act, equity goes up without a loss. It's taking future readings, misses consolidation too. Somewhat interesting - trades are only short.
The diagonal equity line was fun though, it never fails to amuse me
Lets assume we use Moving average connecting highs and use 1 period MA to connect highs and lets make an order to buy if MA rise " this means that new high > previous high" so we have two consecutive highs why The MA logic donot repaints !!!!!!! and could we apply that logic to Gann trend indicator to fix it?????
It's almost now as Gann swing, if highs of previous bars are equal, it still opens a position, but that happens seldom.
[Opening Point of the Position]
Bar Opening
Enter the market at the beginning of the bar
Base price - Open
[Opening Logic Condition]
Moving Average
[ A ] The Moving Average rises
Smoothing method - Simple
Base price - High
Period - 1
Shift - 0
Use previous bar value - Yes
[Opening Logic Condition]
Long or Short
[ A ] Open long positions only
[Opening Logic Condition]
Moving Average
[ B ] The Moving Average rises
Smoothing method - Simple
Base price - Low
Period - 1
Shift - 0
Use previous bar value - Yes
[Opening Logic Condition]
Long or Short
[ B ] Open short positions only
If we now use shift, it's possible to take into account more than 2 consecutive high/lows. Only downside to it is the number of slots - 2 consecutive high/lows takes 4 slots, 3 consecs take 8 slots etc.
EDIT: let me correct a mistake - 6 slots for 3 consecs.
Ok, I got the indi do the straight-up-act, equity goes up without a loss. It's taking future readings, misses consolidation too. Somewhat interesting - trades are only short.
The diagonal equity line was fun though, it never fails to amuse me
The results are very good to be true or what , if the indicator logic is right i think we will all gathering in Hawaii soon
Lets assume we use Moving average connecting highs and use 1 period MA to connect highs and lets make an order to buy if MA rise " this means that new high > previous high" so we have two consecutive highs why The MA logic donot repaints !!!!!!! and could we apply that logic to Gann trend indicator to fix it?????
It's almost now as Gann swing, if highs of previous bars are equal, it still opens a position, but that happens seldom.
its like the gann without the natural filter in gan which let you out when market consolidate
[Opening Logic Condition]
Moving Average
[ A ] The Moving Average rises
Smoothing method - Simple
Base price - High
Period - 1
Shift - 0
Use previous bar value - Yes.
i think the MA have to fall in scenario B
If we now use shift, it's possible to take into account more than 2 consecutive high/lows. Only downside to it is the number of slots - 2 consecutive high/lows takes 4 slots, 3 consecs take 8 slots etc.
EDIT: let me correct a mistake - 6 slots for 3 consecs.
i donot get that point what you mean !!!
I think the Gann line should continue to the top of 8.29, the white bar. High[8.29] is higher than High[8.28] (the white bar), and up trend was in place.
Yes !!!!!!! the 1st thought i get that it is an outside bar and gives a mixed signal " but the candle is closed up so it should be connected
Also i noticed that outside bars give some confusion with mixed signals especially when we use 2 bars periods
Could you apply a filter for outside bars " to be considered void '' !!!!!!!!
REgards
ok, I'm going to remove the 21:04:08 post, that is a beat version, don't want people using it before it works well.
Also -- I'm sorry, my mistake. Do not use as Open yet. I forgot to remove it, it does not work yet. Only as Open Filter, after Bar Closing.
For Open, it uses the underlying Donchian Channel indicator.
so why it give results when using as opening logic!!!!!!!
i think the MA have to fall in scenario B
If we now use shift, it's possible to take into account more than 2 consecutive high/lows. Only downside to it is the number of slots - 2 consecutive high/lows takes 4 slots, 3 consecs take 8 slots etc.
EDIT: let me correct a mistake - 6 slots for 3 consecs.
i donot get that point what you mean !!!
If fall, then it won't work, look at logical groups, if high rises->long, if low falls->short.
If you add another set of MA's with shift 1, you compare previous values, and by that you extend the range in which you want the MA to rise or fall.
Hello
Any news about the indicator !!!!!!!!
Thanks
Hi ahmedalhoseny, footon,
try this version, beta 2.
- added Open and Close
- for outside bars, it continues from previous bar; so if bar is wider than previous, and previous was up trend, this bar will be up trend too
I don't have my MT4 demo up, I have not been able to do any FST-FSB match testing yet.
I have not tested Add / Reduce / Reverse positions. I hope they work. I don't think they crash.
Please advise when you have downloaded beta 2 -- then I will remove attachment.
If this version does not work, or it's missing entries, I may have redo the coding and try a different technique.
thanks,
krog
EDIT (2 hours later) > I see the attachment on the "Edit Post", but I don't see on the post. Can you download? I will notify, could be due to wiki update.
No download, bugger. Worst case scenario - we need Miro to come back before everything turns to normal...
EDIT1: I tried to edit your post (Krog's), but I don't see the attachment in the edit window either.
EDIT2: If it takes a long time to be sorted out, maybe Krog you can post the code.
Test:code section works
for outside bars, it continues from previous bar; so if bar is wider than previous, and previous was up trend, this bar will be up trend too.
So if outside bar with the direction of trend so it will connected " if trend up and out side bar is up so it is connected " i.e counted with the trend "
but if trend is up and outside bar is black this mean we not connect it " considered a consolidation
krog wrote:for outside bars, it continues from previous bar; so if bar is wider than previous, and previous was up trend, this bar will be up trend too.
So if outside bar with the direction of trend so it will connected " if trend up and out side bar is up so it is connected " i.e counted with the trend "
but if trend is up and outside bar is black this mean we not connect it " considered a consolidation
Ah ok I see, in that case, I think the indicator must be Open Filter (after Bar Closing) only. It is impossible to know the color of the bar until after the bar closes.
ahmedalhoseny wrote:krog wrote:for outside bars, it continues from previous bar; so if bar is wider than previous, and previous was up trend, this bar will be up trend too.
So if outside bar with the direction of trend so it will connected " if trend up and out side bar is up so it is connected " i.e counted with the trend "
but if trend is up and outside bar is black this mean we not connect it " considered a consolidationAh ok I see, in that case, I think the indicator must be Open Filter (after Bar Closing) only. It is impossible to know the color of the bar until after the bar closes.
yes and i think indicator logic will be reliable and results will be more stable if we wait one bar to see where its high and low are !!!
By the way nice work and i need to know if you test the indicator , because i test it on the FST and it miss most of trades found by FSB !! did you see that behaviour also "i mean the 1st beta indicator "
By the way nice work and i need to know if you test the indicator , because i test it on the FST and it miss most of trades found by FSB !! did you see that behaviour also "i mean the 1st beta indicator "
I have not tested on FST, to test for FST-FSB missing trades.
Forex Software → Technical Indicators → Gann 2-bars indicator
Powered by PunBB, supported by Informer Technologies, Inc.