CLOSE croesses under MA doesn’t work?
Forums › ProRealTime English forum › ProBuilder support › CLOSE croesses under MA doesn’t work?
- This topic has 4 replies, 3 voices, and was last updated 3 years ago by Nicolas.
Viewing 5 posts - 1 through 5 (of 5 total)
-
-
07/23/2020 at 12:45 PM #139959
Hi,
I create an indicator and want to check if a bar is crosses under the MA10, MA20 and MA30 at the same day. If it is, then the output is minus. But it seems it doesn’t work always. See my attached screenshot.
My code looks as follow:
1234567891011121314151617...// MAMA1 = ExponentialAverage[10](close)MA2 = ExponentialAverage[20](close)MA3 = ExponentialAverage[30](close)......cExit = (close crosses under MA1) and (close crosses under MA2) and (close crosses under MA3)......if cExit thenoutput = -1elseoutput = 0...RETURN output07/23/2020 at 3:05 PM #139977This works fine:
12345678910MA1 = ExponentialAverage[10](close)MA2 = ExponentialAverage[20](close)MA3 = ExponentialAverage[30](close)cExit = (close crosses under MA1) and (close crosses under MA2) and (close crosses under MA3)if cExit thenoutput = -1elseoutput = 0endifRETURN output07/23/2020 at 7:21 PM #139995Thanks first!
I simply copy your code and have a try by me. But it looks it doesn’t work 100%. See attached screenshots. Really strange. :-/
07/24/2020 at 12:17 AM #140005Check that periods and average type on your chart are the same as in your code and that you are using a numer of unit large enough (1K should do).
07/24/2020 at 10:22 AM #140014 -
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)