Help with ADX - page 2

 
RaptorUK:
How do you know this ? are you printing the ADX value when the trade is taken ? you can't see from the chart of a completed bar what the ADX value was while the bar was forming . . .


Although i put a print() inside the test and it shows all values above 50,yet on the chart its below 50,how is this possible and how can be corrected? And the ADX was casted on the close price, isnt this supposed to show only the closing value? And slippage is set to 0.
 
Proximus:
Tried this way too, it shows ADX OK and FMA OK but still take the trades...

It is hard to say more, considering you wrote that the conditions are tested again later. It seems there is some kind of trouble with the conditions together, not with ADX.

If you want to examine the ADX in details now I can think of one possibility: there are some indicators which give EMPTY_VALUE result for 0. bar, which is 2147483647, much higher than 50 or 90.

Probably this is not the case but you may check, especially when you take bar 0 value which changes on every tick.

 
Proximus:

Although i put a print() inside the test and it shows all values above 50,yet on the chart its below 50,how is this possible and how can be corrected? And the ADX was casted on the close price, isnt this supposed to show only the closing value? And slippage is set to 0.

As I already said . . . you are using Bar 0 for your ADX, while that bar is forming the ADX for Bar 0 changes, while it is forming it's ADX value may be higher than 50, and when the bar is complete it's ADX may be less than 50 . . . what you see on a completed chart is it final ADX value.

If you want to use the same value you see on the chart do not use Bar 0, use Bar 1 or higher.

 
RaptorUK:
How do you know this ? are you printing the ADX value when the trade is taken ? you can't see from the chart of a completed bar what the ADX value was while the bar was forming . . .


I think you can also see highest, lowest ADX values within a bar by attaching ADX with applied price high and/or low.
 
szgy74:

I think you can also see highest, lowest ADX values within a bar by attaching ADX with applied price high and/or low.
That may well give a higher value than the highest value seen for the bar while forming based on the CLOSE applied price though . . .
 
RaptorUK:

As I already said . . . you are using Bar 0 for your ADX, while that bar is forming the ADX for Bar 0 changes, while it is forming it's ADX value may be higher than 50, and when the bar is complete it's ADX may be less than 50 . . . what you see on a completed chart is it final ADX value.

If you want to use the same value you see on the chart do not use Bar 0, use Bar 1 or higher.

I use it now on bar 2 and it works but on bar 1 it doesnt,i guess its just a delay.Anyway thanks much for help!