Bull candle time WRONG OUTPUT (use exploration and see it)

Discussion in 'Trading Software' started by fxtraders, Nov 6, 2016.

  1. We try to compare 1 min . and 15 min. candle close
    Of course we're not going to change setting, it's default 1 minute.
    Now if we do exploration, it gives wrong output for 15 min.
    We only looking for bull candle close time.


    For 1 min. working fine as default settings is 1 min.
    Use Code below and see in amibroker

    Code:
    bull= C>O;
    Filter=bull;
    dt = DateTime();
    AddColumn( dt, "Date", formatDateTime );
    AddColumn( bull, "Signal", formatChar );
    
    [​IMG]

    [​IMG]

    FOR 15 MINUTE , IT GIVES WRONG OUTPUT, USE BELOW CODE AND SEE BY YOURSELF


    [​IMG]
    Code:
    Plot( C, "Close", ParamColor( "Color", colorDefault ), styleNoTitle | ParamStyle( "Style" ) | GetPriceStyle() );
    expandmode = expandfirst;
    TF = in15Minute;
    TimeFrameSet( TF );
    dt = DateTime();
    bull = C>O;
    TimeFrameRestore();
    fifteen = TimeFrameExpand( dt, TF, expandmode );
    fifteenn = TimeFrameExpand( bull, TF, expandmode );
    printf( "`15 Minute candle timeframe: " + DateTimeToStr( SelectedValue( fifteen ) ));
    Filter = bull;
    AddColumn( dt, "Date", formatDateTime );
    
     
    Last edited: Nov 6, 2016
  2. I think it's too early to expect a bullish engulfing candle after this bear trend. The upmove is most likely to be a pullback. In 15min, it probably shows something like a doji or bearish hammer
     
  3. M.ST.

    M.ST.


    Perhaps you should learn how to program properly.
    Even without applying your 2nd code one can see immediately that you are assigning non-expanded bull variable to Filter variable.
     
    victorycountry likes this.
  4. filter = fifteenn; isn't solving the problem ..
    or
    function bull(P)
    {
    Pv = C>O;
    return Pv;
    }
    p = datetime();

    xyz = bull(p); isn't work either...
     
    Last edited: Nov 7, 2016
  5. M.ST.

    M.ST.

    Do you actually understand mode expandfirst?

    There isn't wrong output.

    Your most recent post does not make any sense either. Function's argument P does not have any function within the function's inner code.

    Do you actually understand what you are doing?

    What do you even consider as being wrong? There isn't any exact mention. There is just chaotic use of words.
     
  6. expandfirst when you use start of interval ..

    It's wrong output: only looking for 15 minute bull candle, not all candle sequence ..
    exploration should not be like:
    3:15,3:00,2:45,2:30,2:15,2:00... it's wrong..

    [​IMG]

    It should be: 3:15, 2:45,2:30,2:15,1:45 .....
    It is not working this way ..
    b.setting is 1 min.
     
  7. M.ST.

    M.ST.

    You don't know what you are doing.
    I have already told you that you have not used expanded variables.
    Check your code. You have to use expanded variable in output column also.
     
  8. Code:
    Plot( C, "Close", ParamColor( "Color", colorDefault ), styleNoTitle | ParamStyle( "Style" ) | GetPriceStyle() );
    expandmode = expandfirst;
    TF = in15Minute;
    TimeFrameSet( TF );
    dt = DateTime();
    bull = C>O;
    TimeFrameRestore();
    expanddt = TimeFrameExpand( dt, TF, expandmode );
    expandbull = TimeFrameExpand( bull, TF, expandmode );
    printf( "`15 Minute candle timeframe: " + DateTimeToStr( SelectedValue( fifteen ) ));
    Filter = expandbull;
    AddColumn( expanddt, "Date", formatDateTime ); //eXPANDED VARIABLE
    //AddColumn( expandbull, "bull", 1, colorDefault, colorDefault, 70 ); (EXPANDED vARIABLE?)
    
    not working .. filter and addcolumn , both have expanded variable.
     
    Last edited: Nov 7, 2016
  9. M.ST.

    M.ST.

    What is not working?
     
  10. exploration should not be like:
    3:15,3:00,2:45,2:30,2:15,2:00... it's wrong..
    It should be: 3:15, 2:45,2:30,2:15,1:45 .....(such candle represent bull candle time )
    It is not working this way ..

    OR ...


    Step 1: Copy below code, do exploration while b.setting is 1 min.

    Code:
    Plot( C, "Close", ParamColor( "Color", colorDefault ), styleNoTitle | ParamStyle( "Style" ) | GetPriceStyle() );
    expandmode = expandfirst;
    TF = in15Minute;
    TimeFrameSet( TF );
    dt = DateTime();
    bull = C>O;
    TimeFrameRestore();
    expanddt = TimeFrameExpand( dt, TF, expandmode );
    expandbull = TimeFrameExpand( bull, TF, expandmode );
    printf( "`15 Minute candle timeframe: " + DateTimeToStr( SelectedValue( fifteen ) ));
    Filter = expandbull;
    AddColumn( expanddt, "Date", formatDateTime ); //eXPANDED VARIABLE
    //AddColumn( expandbull, "bull", 1, colorDefault, colorDefault, 70 ); (EXPANDED vARIABLE?)
    
    Step 2: Take a picture of your 15 minute chart (candle chart as i have, your last 20-30 bar picture ) .. and also take a picture of exploration (select 20 or 30 last bar).. post it here

    I will try to point out ..
     
    Last edited: Nov 8, 2016
    #10     Nov 8, 2016