EasyLanguage Question

Discussion in 'Trading Software' started by tdefarlo, Apr 26, 2002.

  1. Kymar

    Kymar

    I'm not sure I understand exactly what you're trying to say...

    But the previous signal (mostly) works (some odd probem with first instance that I don't have time to check right now) written for multiple data streams like this:

    {BUT AT PREVIOUS DAY HIGH}

    VARS: PDHIGH(0);

    IF TIME = SESS1ENDTIME THEN PDHIGH = H Data(2);
    BUY NEXT BAR AT PDHIGH STOP;

    Though it's short, I wouldn't recommend this particular version of the signal, just because I find using multiple data streams cumbersome, and better avoided except where strictly necessary.
     
    #31     May 16, 2002
  2. Let's say I want to buy intraday as soon as it takes out the previous day's high
    --------------------------------------------------------------------------------


    hi ,
    most times, i buy yesterdays high.
    i wrote in my strategy that way:

    applied to intraday 3/5 min chart:

    if close > highd(1) then buy this bar on close;

    it looks so easy compared to last example.
    (which does in NO WAY mean last post is wrong !!!)

    i guess the most scripting i saw here (and last post) look more complex cause u use this charts very different to me.

    what is the sense of this complicate meaning/watching ?

    that would i would love to see doesnt work:
    add tick-data to intraday - chart.

    all others dont make sense to me, which does not means it has no sense :)


    lippi
     
    #32     May 16, 2002
  3. Kymar

    Kymar

    Frankly, never noticed the highd function before! Should work fine...

    However, I do think many would prefer to use a buy stop rather than a buy on close order, as in:

    BUY NEXT BAR HIGHD(1) STOP;

    That way, regardless of what time compression you're using, the signal will be produced "as soon as" the HIGHD(1) is crossed, instead of at the close of whatever bar...

    By the way, on the multi-data thing, you can find more examples in included indicators and functions, such as:
     
    #33     May 16, 2002
  4. kymar,

    i STRONGLY hope, this code example was not understood as a real strategy !!

    it was an example.

    indeed, i use stop buys in that way, sometimes 2 stop buys, 1 with a limit lower, or use a second entry at market also lower, when first stop was hidden (very complex programming)


    but strategy was not the point i think.
    i was just wondering about your all kind of programming strategies.

    i was really afraid i had misunderstood EL at all.

    think i didnt :)

    lets go one with this great thread here

    best luck

    lippi
     
    #34     May 16, 2002
  5. kymar,

    if u use HIGHD(?), LOWD(?) ...

    remember, this function is adding all last days intraday bars !!

    so if u use a 3min intraday chart, u will have about 130 bars for yesterday, 130 bars the day before yesterday...

    if your strategy is set to default(bars back = 50) u will not get the exact highest last days value,just the highest of last 50 bars (of yesterday)

    barsback has at least to be 130 ( i use 150) .
    in case of 2 days back, i had to mis-buys before i understood reason

    lippi
     
    #35     May 16, 2002
  6. Kymar

    Kymar

    didn't finish previous post: included indicators that use multiple data streams include MARKET THRUST and SPREAD...
     
    #36     May 16, 2002
  7. Kymar

    Kymar

    sounds like even 130 wouldn't be enough, depending on how things are written...

    In some cases, having a maxbarsback setting that high may not be desirable...

    Might be a reason to use one of the other methods of getting the day's high or low - in this instance, where you set a variable that is or is not replaced bar by bar by a greater value, then is re-set at the last bar of the session or first bar of next session (depending on uses...).
     
    #37     May 16, 2002
  8. ---------------------------------------------------------------------------------------------------------------
    sounds like even 130 wouldn't be enough, depending on how things are written...

    In some cases, having a maxbarsback setting that high may not be desirable...

    Might be a reason to use one of the other methods of getting the day's high or low - in this instance, where you set a variable that is or is not replaced bar by bar by a greater value, then is re-set at the last bar of the session or first bar of next session (depending on uses...).

    --------------------------------------------------------------------------------------------------------------

    kymar,

    i agree with you.

    when i wrote this code, i did not know, that code knows last value of variables when executing next bar.

    so i wrote code in a way, as if variables are initialized every time, when code is running through a bar.

    but it makes code much easier to handle in the way i did.

    so i still handle all variables as beeing inititialized again
    (means : i do the init),
    and those, i still need, i dont initialize.


    well, the code is easy to read then.

    and so i can very easy understand functions, i wrote a long time ago.

    i just used last posted code for example, but in some of my strategies, it is still included ( with stop buys/sells of course)

    lippi
     
    #38     May 16, 2002
  9. Kymar

    Kymar

    Just was chewing it over, not that hard.

    I think this is what you want (as indicator):
    _____________________________________________

    {GET VIRTUAL DAILY STOCHASTIC DURING INTRADAY TIME
    FRAME, USING TWO DATA STREAMS.

    SET UP INTRADAY AS DATA1, DAILY AS DATA2}


    INPUTS: STOCHLENGTH(5), OB(80), OS(20);
    VARS: LL(0),HH(0),NUM(0),DEN(0), MDFastK(0);

    LL = Lowest( L Data(2), StochLength ) ;
    HH = Highest( H Data(2), StochLength ) ;
    If L Data(1) < LL then LL = L;
    If H Data(1) > HH then HH = H;
    Num = C Data(1) - LL ;
    Den = HH - LL ;

    if Den > 0 then
    MDFastK = Num / Den * 100;

    Plot1(MDFastK, "FASTK");
    Plot2(OB,"Overbot");
    Plot3(OS,"Oversold");

    ______________________________________________

    Looks like this:

    http://home.pacbell.net/ckmcld/MDSTOCH.gif

    The bottom indicator is FastK applied to daily data - as you can see the end-of-session values (the only ones relevant for the daily FastK) are equivalent.

    Another way to do it with just a single datastream (i.e., intraday) would be to use an array to capture HH and LL for each day.
     
    #39     May 16, 2002
  10. Bob777

    Bob777

    Would someone please help me with some code for TS6?

    Close is greater than 80% of the range of bar. For example: If the range of the bar was 10 points, the close is 8 or greater points.

    Also, does anyone have the code for the 1-2-3 strategy that was given out at the free seminars? When I was at the Vegas expo my flight left before the Tradestation class and they didn't have any handouts to give out before the class.

    Thanks in advance!
     
    #40     May 24, 2002