Coding Moving crossing other Averages

Forums ProRealTime English forum ProOrder support Coding Moving crossing other Averages

Viewing 6 posts - 1 through 6 (of 6 total)
  • #40025

    Hi everyone,

    I have problem with coding a line.

    I want to BUY when the WilderAverage[1](close) crosses over Wilder Average[6] (close)[6]*1.0003 and then crosses over Wilder Average[6] (close)[6]*1.001, and after the first bull candle > than Wilder Average[6] (close)[6]*1.001

    REM Conditions

    entrylargo1 = WilderAverage[1](close) crosses over Wilder Average[6] (close)[6]*1.0003 AND crosses over Wilder Average[6] (close)[6]*1.001

    entrylargo2 = (open<close) >Wilder Average[6] (close)[6]*1.001

    I wrote:

    IF NOT LONGONMARKET AND entrylargo1 AND entrylargo2 THEN

    BUY 1 CONTRACT AT MARKET

     

    But, nothing happens.

    Any suggestions?

    Thanks in advance,

    Juan

     

    #40026

    AND in PRT is the logical AND and not the conjunction one uses in normal speech. So your condition could be:

     

    #40027

    Despair,

    THANNNKKKKKSSSSS so much!!

    It makes sense,

    Juan

    #40038

    Hi Despair,

    I did it like you said, but still nothing happens. Do you think that it has something to do with the fact that the Moving Average are 6 period forward???

    I am attaching a portion of the code (the rest is incomplete), to see if anyone can see what is wrong in these lines.

    Thanks in advance,

    Juan

    #40041

    I think the problem is that all these requisites do not happen in the last candle. I have removed two of the three moving averages and I have one operation.

    It seems like 1.crossing the average and 2. than last candle is a bullish/green and that 3. its close is above the average, all have to happen in the last candles.

    Juan

    #40043

    I meant “in the last candle” (singular)

Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login