Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

3monkeys

Members
  • Content Count

    47
  • Joined

  • Last visited

Posts posted by 3monkeys


  1. Just curious if anyone has any idea what's going on today.

     

    I'm only watching the EUR/USD, but it's crazy...crazy impulsive moves, spreads through the roof, etc.

     

    I'm even for the day right now, and I think I'm just calling it quits for today...to preserve my capital! I'm not used to this. I'm going to sit back and observe.

    Unexpected CPI numbers (0.2% forecast, -0.1% actual) , deflation worries.

    8:30am USD CPI m/m -0.1% 0.2% 0.1%


  2. Hi There, I'm new to Traders Laboratory and a beginner to TS Easy Language. I appreciate any help and tips. I'm currently trying to write a strategy for MACD convergence divergence. Basically I want to look at the 5 bars prior to a cross down, choose the highest MACD value and the highest high and store those numbers somehow. Then compare those numbers to the previous time the MACD crossed down whose numbers have already been "stored".

    I 'm pretty sure I can do the comparisons, I think I need to use a counter to reference the previous cross down, I think I need to declare values to store these numbers and I'm pretty sure I will need to use MRO to avoid the occasional cross up and cross down and cross back up every bar or two. Anyway, I'm way beyond my abilities of the EL boot camp and am willing to pay for a good EL consultant but I would really like to learn this as well.

    Thanks much

    There are plenty of EL specialist for hire. Look in the TS forum to start.

     

    If you are interested in a macd strategy, perhaps the thread:

    A Leading MACD !

    https://www.tradestation.com/Discussions/Topic.aspx?Topic_ID=22670


  3. TS doesn't read DLL

     

    You will have to open the .asc files or study file and find the line that calls the DLL and see the location

    This is silly. It is like saying TS doesn't read or write any files because it has to call Windows API to process the request.

     

    A 32-bit compiled program or code called from a 32-bit program cannot make direct 16-bit API or DLL calls. The most common error you will get is dll "file not found" .

     

    If the OP acquired the software legally and the vendor is still supporting the software, the OP should ask the vendor for a 32bit dll.


  4. Neeto I don't have that dialogue on my 6beta2 but TSSupport are not renowned for there version control :)

     

    What is the hieroglyphics in the contract description box? Is that to do with getting historical data?

     

    It is under Quotemanager, Instrument, add custom futures.

    The 'hieroglyphics' is generated automatically by the setup and presumably describes the rollover of the custom futures, similar to the function in Tradestation.


  5. Multicharts Version 6.0 Beta 2 (Build 3102) allows for continuous futures to be built with customizable rules. For example with the following setting for CL from IB data.

     

    attachment.php?attachmentid=20250&stc=1&d=1269314716

    MC_CL_cont_setting.gif.0e8afcdf6d4b0c7722440d553d21d128.gif


  6. So, you want someone to either translate the code for you to Easylanguage, or run the code for you on Amibroker? So you want someone to do all the work for you while you do... nothing?
    Becareful. The OP is from Sicily. He may make you an offer you can't refuse. :)

     

    NICK MA Swing looks like the Heikin Ashi trend (TTM trend) which has been covered here:

    http://www.traderslaboratory.com/forums/f56/heikin-ashi-ttm-trend-strategy-7195.html

    _SECTION_BEGIN("NICK MA Swing");
    SetBarsRequired(200,0);
    
    GraphXSpace = 5;
    SetChartOptions(0,chartShowArrows|chartShowDates);
    k =  Optimize("K",Param("K",1.25,0.25,5,0.25),0.25,5,0.25);
    Per= Optimize("atr",Param("atr",11,3,20,1),3,20,1);
    HACLOSE=(O+H+L+C)/4;
    HaOpen = AMA( Ref( HaClose,  -1 ),  0.5 );
    HaHigh = Max( H,  Max( HaClose,  HaOpen ) );
    HaLow = Min( L,  Min( HaClose,  HaOpen ) );
    PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "" + Name(), colorBlack, styleCandle | styleNoLabel );
    j=Haclose;
    
    //=======================================================================================================================
    //=========================Indicator==============================================================================================
    f=ATR(14);
    
    rfsctor = WMA(H-L, Per);
    
    revers = k * rfsctor;
    
    Trend = 1;  
    NW[0] = 0;  
    
    
    for(i = 1; i < BarCount; i++)
    {
    if(Trend[i-1] == 1)                
    {
     if(j[i] < NW[i-1])                 
     {
      Trend[i] = -1;                   
      NW[i] = j[i] + Revers[i];        
     }
     else                              
     {
      Trend[i] = 1;
      if((j[i] - Revers[i]) > NW[i-1])
      {
       NW[i] = j[i] - Revers[i]; 
      }
      else
      {
       NW[i] = NW[i-1];
      }
     } 
    }
    if(Trend[i-1] == -1)               
    {
     if(j[i] > NW[i-1])                
     {
      Trend[i] = 1;                    
      NW[i] = j[i] - Revers[i];        
     }
     else                              
     {
      Trend[i] = -1;
      if((j[i] + Revers[i]) < NW[i-1]) 
      {
       NW[i] = j[i] + Revers[i]; 
      }
      else
      {
       NW[i] = NW[i-1];
      }
     }
    }
    }
    
    //===============system================
    // trade on next bar open
    SetTradeDelays( 1, 1, 1, 1 );
    BuyPrice = SellPrice = Open; 
    
    Plot(NW, "", IIf(Trend == 1, 27, 4), 4);
    Buy=Cover=Cross(j,nw);
    Sell=Short=Cross(nw,j);
    //SellPrice=ValueWhen(Sell,C,1);
    //BuyPrice=ValueWhen(Buy,C,1);
    Long=Flip(Buy,Sell);
    Shrt=Flip(Sell,Buy );
    _SECTION_END();
    //=================TITLE================================================================================================
    _SECTION_BEGIN("Title");
    if( Status("action") == actionIndicator ) 
    (
    Title = EncodeColor(colorWhite)+ "NICK MA Swing System" + " - " +  Name() + " - " + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorWhite) +
    "  - " + Date() +" - "+"\n" +EncodeColor(colorYellow) +"Op-"+O+"  "+"Hi-"+H+"  "+"Lo-"+L+"  "+
    "Cl-"+C+"  "+ "Vol= "+ WriteVal(V)+"\n"+ 
    EncodeColor(colorLime)+
    WriteIf (Buy , " GO LONG / Reverse Signal at "+C+"  ","")+
    WriteIf (Sell , " EXIT LONG / Reverse Signal at "+C+"  ","")+"\n"+EncodeColor(colorWhite)+
    WriteIf(Sell , "Total Profit/Loss for the Last Trade Rs."+(C-BuyPrice)+"","")+
    WriteIf(Buy  , "Total Profit/Loss for the Last trade Rs."+(SellPrice-C)+"","")+
    WriteIf(Long AND NOT Buy, "Trade : Long - Entry price Rs."+(BuyPrice),"")+
    WriteIf(shrt AND NOT Sell, "Trade : Short - Entry price Rs."+(SellPrice),"")+"\n"+ 
    WriteIf(Long AND NOT Buy, "Current Profit/Loss Rs."+(C-BuyPrice)+"","")+
    WriteIf(shrt AND NOT Sell, "Current Profit/Loss Rs."+(SellPrice-C)+"",""));
    PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
    PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
    PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45); 
    PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
    PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);                      
    PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);
    _SECTION_END();

     

    The other (KAMA system) is more complicated with linear regression SD lines and Fib levels:

     

    _SECTION_BEGIN("BACK COLR");
    SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )),
    
    ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 )));
    
    _SECTION_END();
    
    // Two adjustable parameter "Buy sensitivity" and "Buy Finetune" provided to adjust entry points.
    // Two adjustable parameter "Sell sensitivity" and "Sell Finetune" provided to adjust Exit points.
    
    _SECTION_BEGIN("KAMA System 1.0");
    
    
    
    
    SetChartOptions(0,chartShowArrows|chartShowDates);
    Title = ("KAMA SYSTEM - " + Name()+"  " + Date() +"  "+Interval(2) +"  "+ EncodeColor(colorLime)+",Open "+Open +" ,High "+H+" ,Low "+L+" ,Close "+C+" "+"{{VALUES}}");
    
    
    //{{VALUES}}"+ O+ H+ L+C);
    
    
    //_N(Title =StrFormat("{{Name}} - {{Interval}} {{Date}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
    
    
    // Buy adjustments
    bs=Param("BUY Sensitivity",7,2,20,1);
    bf=Param("BUY Finetune",2,0.1,20,0.1);
    
    ///uncommentf for optimization
    //bs=Optimize("BUY Sensitivity",7,2,20,1);
    //bf=Optimize("BUY Finetune",2,0.1,20,0.1);
    // Sell Adjustments
    ss=Param("SELL Sensitivity",5,2,20,1);
    sf=Param("SELL Finetune",1,0.1,20,0.1);
    
    ///uncommentf for optimization
    ss=Optimize("SELL Sensitivity",5,2,20,1);
    sf=Optimize("SELL Finetune",1,0.1,20,0.1);
    
    
    //stock selection parameters
    MyCL = Param( "CL", 10, 10, 100, 10 );
    MyVK = Param( "VK", 30, 10, 100, 10 );
    MyTL = Param( "TL", 300, 100, 1000, 100 );
    //stock selection
    //TLM = EMA(C*V/100000,100) ;
    //include = C> MyCL AND V/1000> MyVK AND C*V/100000 > MyTL AND TLM > 0.333 * MyTL ; 
    
    // common
    fast = 2/(2+1);
    slow = 2/(30+1);
    //BUY part
    dirb=abs(Close-Ref(Close,-bs));
    volb=Sum(abs(Close-Ref(Close,-1)),bs);
    ERb=dirb/volb;
    scb =( ERb*(fast-slow)+slow)^2; 
    xb = AMA( C, scb ); 
    flb=bf*StDev(xb-Ref(xb,-1),20);
    j=xb-Ref(xb,-3);
    
    
    //SELL part
    dirs=abs(Close-Ref(Close,-ss));
    vols=Sum(abs(Close-Ref(Close,-1)),ss);
    ERs=dirs/vols;
    scs =( ERs*(fast-slow)+slow)^2; 
    xs = AMA( C, scs ); 
    fls=sf*StDev(xs-Ref(xs,-1),20);
    k=Ref(Xs,-3)-Xs;
    
    Buy=Cross(j,flb) ;
    Sell=Cross(k,fls);
    mycolor=IIf(C>xb,colorLime,colorRed);
    Plot( C, "Close", mycolor,styleNoTitle | styleCandle  ); 
    Plot(xb,"KAMA-BUY",colorRed,1);
    Plot(xs,"KAMA-SELL",colorOrange,1);
    Buy = ExRem(Buy,Sell);
    Sell = ExRem(Sell,Buy);
    
    shape = Buy * shapeUpArrow +Sell * shapeDownArrow ;
    
    PlotShapes( shape, IIf( Buy, colorLime, colorRed),0, IIf( Buy, Low, High ) );
    
    GraphXSpace = 5;
    dist = 1.5*ATR(20); 
    
    for( i = 0; i < BarCount; i++ ) 
    { 
    if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ]-dist[i], colorLime ); 
    if( Sell[i] ) PlotText( "sell\n@" + C[ i ], i, L[ i ]+dist[i], colorRed ); 
    } 
    Filter= Buy OR Sell;
    
    PositionScore=100/C;
    PositionSize = - 20;
    SetBarsRequired(10000, 10000);
    SetFormulaName("KAMA System");
    
    _SECTION_END();
    
    _SECTION_BEGIN("IIR2");
    // IIR2.afl
    //
    // Documentation to describe what the function does.
    // Second order smoother
    // the function statement
    function IIR2( input, f0, f1, f2 )
    // the function body
    {
    result[ 0 ] = input[ 0 ];
    result[ 1 ] = input[ 1 ];
    for( i = 2; i < BarCount; i++ )
    {
    result[i] = f0 * input[i] + f1 * result[i-1] + f2 * result[i-2];
    }
    // the function returns a single value and exits.
    return result;
    }
    // The routine that calls the function.
    SmoothedClose = IIR2(Close, 0.2, 1.4, -0.6 );
    //Plot( Close, "Price", 2, styleCandle );
    Plot( SmoothedClose, "function example", colorRed );
    //Figure 8.1 IIR2
    _SECTION_END();
    
    _SECTION_BEGIN("GSMA");
    SetBarsRequired(100000,0);
    PI = 3.1415926;
    
    function jIIR2( input, f0, f1, f2 ) 
    { 
       result[ 0 ] = input[ 0 ]; 
       result[ 1 ] = input[ 1 ]; 
    
       for( i = 2; i < BarCount; i++ ) 
       { 
          result[ i ] = f0 * input[ i ] + 
                        f1 * result[ i - 1 ] + 
                        f2 * result[ i - 2 ]; 
       } 
    
      return result; 
    } 
    
    function GSMA( input, Period )
    {
     N = 0;
     an = 2 * PI / Period;
     c0 = b0 = 1;
     c1 = b1 = b2 = a1 = a2 = gamma1 = 0;
     beta1 = 2.415 * ( 1- cos( an ) );
     alpha = -beta1 + sqrt( beta1 ^ 2 + 2 * beta1 );
     alpha1 = ( cos( an ) + sin( an ) - 1 )/cos( an );
      {
       fo = alpha ^ 2;
       f1 = 2 * ( 1- alpha ); f2 = -( 1 - alpha )*( 1 - alpha );
     }
    
    
     return jIIR2( input, fo,f1,f2);
    }
    period=Param("period",13,1,40,1);
    
    //Plot( Close, "Price", colorBlack, styleCandle ); 
    Plot( GSMA( C,period), "GSMA", colorLime );
    
    //  Linear Regression Line with 2 Standard Deviation Channels Plotted Above and Below 
    //  Written by Patrick Hargus, with critical hints from Marcin Gorzynski, Amibroker.com Technical Support 
    //      Designed for use with AB 4.63 beta and above, using drag and drop feature.  
    //  Permits plotting a linear regression line of any price field available on the chart for a period determined by the user.  
    //     2 Channels, based on a standard deviation each determined by the user, are plotted above and below the linear regression line. 
    // 		A look back feature is also provided for examining how the indicator would have appeared on a chart X periods in the past.    
    
    
    P = ParamField("Price field",-1);
    Daysback = Param("Period for Liner Regression Line",21,1,240,1);
    shift = Param("Look back period",0,0,240,1); 
    
    
    //  =============================== Math Formula =============================================================
    
    x = Cum(1);
    lastx = LastValue( x ) - shift; 
    aa = LastValue( Ref(LinRegIntercept( p, Daysback), -shift) ); 
    bb = LastValue( Ref(LinRegSlope( p, Daysback ), -shift) ); 
    y = Aa + bb * ( x - (Lastx - DaysBack +1 ) ); 
    
    
    // ==================Plot the Linear Regression Line ==========================================================
    
    
    LRColor = ParamColor("LR Color", colorCycle ); 
    LRStyle = ParamStyle("LR Style");
    
    LRLine =  IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y, Null );
    Plot( LRLine , "LinReg", LRCOLOR, LRSTYLE ); //  styleDots ); 
    
    // ==========================  Plot 1st SD Channel ===============================================================
    
    SDP = Param("Standard Deviation", 1.5, 0, 6, 0.1);
    SD = SDP/2;
    
    width = LastValue( Ref(SD*StDev(p, Daysback),-shift) );   // THIS IS WHERE THE WIDTH OF THE CHANELS IS SET  
    SDU = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y+width , Null ) ;
    SDL = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y-width , Null ) ;
    
    SDColor = ParamColor("SD Color", colorCycle ); 
    SDStyle = ParamStyle("SD Style");
    
    Plot( SDU , "Upper Lin Reg", SDColor,SDStyle ); 
    Plot( SDL , "Lower Lin Reg", SDColor,SDStyle ); 
    
    //  ==========================  Plot 2d SD Channel ===============================================================
    
    SDP2 = Param("2d Standard Deviation", 2.0, 0, 6, 0.1);
    SD2 = SDP2/2;
    
    width2 = LastValue( Ref(SD2*StDev(p, Daysback),-shift) );   // THIS IS WHERE THE WIDTH OF THE CHANELS IS SET  
    SDU2 = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y+width2 , Null ) ;
    SDL2 = IIf( x > (lastx - Daysback) AND BarIndex() < Lastx, y-width2 , Null ) ;
    
    SDColor2 = ParamColor("2 SD Color", colorCycle ); 
    SDStyle2 = ParamStyle("2 SD Style");
    
    Plot( SDU2 , "Upper Lin Reg", SDColor2,SDStyle2 ); 
    Plot( SDL2 , "Lower Lin Reg", SDColor2,SDStyle2 ); 
    
    // ============================ End Indicator Code ==============================================================
    
    //Fibonacci cluster
    
    _SECTION_BEGIN("Background");
    SetChartOptions(0,chartShowArrows|chartShowDates);
    SetChartBkColor(ParamColor("Outer panel",colorWhite)); // color of outer border 
    SetChartBkGradientFill( ParamColor("Inner panel upper",colorWhite),ParamColor("Inner panel lower",colorWhite));
    tchoice=Param("Title Selection ",2,1,2,1);
    
    //Plot(C, "", IIf(O>=C, colorOrange, colorGreen), ParamStyle("Price Style",styleCandle,maskPrice));
    //////////////////////////////////////////////////////////////////
    _SECTION_BEGIN("Fib Retracements");
    fibs = ParamToggle("Plot Fibs","Off|On",1);
    pctH = Param ("Pivot Hi %", 0.325,0.001,2.0,0.002);
    HiLB = Param ("Hi LookBack",1,1,BarCount-1,1);
    pctL = Param ("Pivot Lo %", 0.325,0.001,2.0,0.002);
    LoLB = Param ("Lo LookBack",1,1,BarCount-1,1);
    Back = Param ("Extend Left = 2",1,1,500,1);
    Fwd  = Param("Plot Forward", 0, 0, 500, 1);
    text = ParamToggle("Plot Text","Off|On",1);
    hts  = Param ("Text Shift", -33.5,-50,50,0.10);
    style =ParamStyle("Line Style",styleLine,styleNoLabel);
    x = BarIndex();
    pRp  = PeakBars( H, pctH, 1) == 0;
    yRp0 = SelectedValue(ValueWhen( pRp, H, HiLB));
    xRp0 = SelectedValue(ValueWhen( pRp, x, HiLB));
    pSp  = TroughBars( L, pctL, 1) == 0;
    ySp0 = SelectedValue(ValueWhen( pSp, L, LoLB));
    xSp0 = SelectedValue(ValueWhen( pSp, x, LoLB));
    Delta = yRp0 - ySp0;
    
    function fib(ret)
    {
    retval = (Delta * ret);
    Fibval = IIf(ret < 1.0 
    AND xSp0 < xRp0, yRp0 - retval, IIf(ret < 1.0 
    AND xSp0 > xRp0, ySp0 + retval,IIf(ret > 1.0 
    AND xSp0 < xRp0, yRp0 - retval, IIf(ret > 1.0 
    AND xSp0 > xRp0, ySp0 + retval, Null)))); 
    return FibVal;
    }
    
    x0 = Min(xSp0,xRp0)-Back;
    x1 = (BarCount -1);
    //////////////////////////////////////////////////////////////////
    r236 = fib(0.236);	r236I = LastValue (r236,1);
    r382 = fib(0.382);	r382I = LastValue (r382,1);
    r050 = fib(0.50);		r050I = LastValue (r050,1);
    r618 = fib(0.618);	r618I = LastValue (r618,1);
    r786 = fib(0.786);	r786I = LastValue (r786,1);
    e127 = fib(1.27);		e127I = LastValue (e127,1);
    e162 = fib(1.62);		e162I = LastValue (e162,1);
    e200 = fib(2.00);		e200I = LastValue (e200,1);
    e262 = fib(2.62);		e262I = LastValue (e262,1);
    e424 = fib(4.24);		e424I = LastValue (e424,1);
    //////////////////////////////////////////////////////////////////
    p00 = IIf(xSp0 > xRp0,ySp0,yRp0); 	p00I = LastValue (p00,1);
    p100 = IIf(xSp0 < xRp0,ySp0,yRp0); 	p100I = LastValue (p100,1);
    color00 =IIf(xSp0 > xRp0,colorLime,colorRed);
    color100 =IIf(xSp0 < xRp0,colorLime,colorRed);
    //////////////////////////////////////////////////////////////////
    numbars = LastValue(Cum(Status("barvisible")));
    fraction= IIf(StrRight(Name(),3) == "", 3.2, 3.2);
    //////////////////////////////////////////////////////////////////
    if(fibs==1)
    {
    Plot(LineArray(xRp0-Fwd,yRp0,x1,yRp0,Back),"PR",32,8|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(xSp0-Fwd,ySp0,x1,ySp0,Back),"PS",27,8|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,r236,x1,r236,Back),"",45,style|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,r382,x1,r382,Back),"",44,style|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,r050,x1,r050,Back),"",41,style|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,r618,x1,r618,Back),"",43,style|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,r786,x1,r786,Back),"",42,style|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,e127,x1,e127,Back),"e127",47,style|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,e162,x1,e162,Back),"e162",47,style|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,e200,x1,e200,Back),"p200",47,style|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,e262,x1,e262,Back),"p262",47,style|styleNoRescale,Null, Null,Fwd);
    Plot(LineArray(x0-Fwd,e424,x1,e424,Back),"p424",25,style|styleNoRescale,Null, Null,Fwd);
    }
    //////////////////////////////////////////////////////////////////
    if(text==1)
    { 
    PlotText(" 0% = " + WriteVal(p00,fraction), 	LastValue(BarIndex())-(numbars/hts), p00I  + 0.05, color00);
    PlotText("23% = " + WriteVal(r236,fraction), LastValue(BarIndex())-(numbars/hts), r236I + 0.05, 45);
    PlotText("38% = " + WriteVal(r382,fraction), LastValue(BarIndex())-(numbars/hts), r382I + 0.05, 44);
    PlotText("50% = " + WriteVal(r050,fraction), LastValue(BarIndex())-(numbars/hts), r050I + 0.05, 41);
    PlotText("62% = " + WriteVal(r618,fraction), LastValue(BarIndex())-(numbars/hts), r618I + 0.05, 43);
    PlotText("78% = " + WriteVal(r786,fraction), LastValue(BarIndex())-(numbars/hts), r786I + 0.05, 42);
    PlotText("100% = " + WriteVal(p100,fraction), LastValue(BarIndex())-(numbars/hts),p100I + 0.05, color100);
    PlotText("127% = " + WriteVal(e127,fraction), LastValue(BarIndex())-(numbars/hts),e127I + 0.05, 47);
    PlotText("162% = " + WriteVal(e162,fraction), LastValue(BarIndex())-(numbars/hts),e162I + 0.05, 47);
    PlotText("200% = " + WriteVal(e200,fraction), LastValue(BarIndex())-(numbars/hts),e200I + 0.05, 47);
    PlotText("262% = " + WriteVal(e262,fraction), LastValue(BarIndex())-(numbars/hts),e262I + 0.05, 47);
    PlotText("424% = " + WriteVal(e424,fraction), LastValue(BarIndex())-(numbars/hts),e424I + 0.05, 25);
    }
    _SECTION_END();
    //////////////////////////////////////////////////////////////////
    if (tchoice==1 ) 
    {
    _N(Title = EncodeColor(colorBlack)+StrFormat(" {{NAME}} -   {{INTERVAL}}      {{DATE}}    Open:  %g,    High:  %g,     Low:  %g,     Close:  %g     {{VALUES}}",O, H, L, C, SelectedValue( ROC( C, 1   ) ) ));
    }
    //////////////////////////////////////////////////////////////////
    if (tchoice==2 ) 
    {
    Title = EncodeColor(colorBlack)+  Date() + "   Tick = " + EncodeColor(5) + Interval()+
    EncodeColor(colorBlack) + "     Open = " + EncodeColor(colorBlack) + O + 
    EncodeColor(colorBlack) + "     High = " + EncodeColor(5) + H +
    EncodeColor(colorBlack) + "      Low = " + EncodeColor(colorRed) + L + 
    EncodeColor(colorBlack) + "     Close = " + EncodeColor(colorBlack) + C + "\n" +
    EncodeColor( colorBlack) +"_______________"+"\n"+
    EncodeColor( colorBlack)  + "424%   =  "	+ 	EncodeColor(25)+ e424 + " " +"\n"+
    EncodeColor( colorBlack)  + "262%   =  "	+ 	EncodeColor(47)+ e262 + " " +"\n"+
    EncodeColor( colorBlack)  + "200%   =  "	+ 	EncodeColor(47)+ e200 + " " +"\n"+
    EncodeColor( colorBlack)  + "162%   =  "	+ 	EncodeColor(47)+ e162 + " " +"\n"+
    EncodeColor( colorBlack)  + "127%   =  "	+ 	EncodeColor(47)+ e127 + " " +"\n"+
    EncodeColor( colorYellow) + "  Res    =  "	+ 	EncodeColor(32)+ p100 + " " +"\n"+
    EncodeColor( colorBlack)  + "  78%   =  "	+	EncodeColor(42)+ r786 + " " +"\n"+
    EncodeColor( colorBlack)  + "  62%   =  "	+ 	EncodeColor(43)+ r618 + " " +"\n"+
    EncodeColor( colorBlack)  + "  50%   =  "	+ 	EncodeColor(41)+ r050 + " " +"\n"+
    EncodeColor( colorBlack)  + "  38%   =  "	+ 	EncodeColor(44)+ r382 + " " +"\n"+
    EncodeColor( colorBlack)  + "  23%   =  "	+ 	EncodeColor(45)+ r236+ " " +"\n"+
    EncodeColor( colorYellow) + "  Sup   =   "	+ 	EncodeColor(34)+ p00 + " " ;
    }
    GraphXSpace=5;
    
    _SECTION_BEGIN("BACK COLR");
    SetChartBkGradientFill( ParamColor("BgTop", ColorRGB( 172,172,172 )),
    
    ParamColor("BgBottom", ColorRGB( 172,172,172 )),ParamColor("titleblock",ColorRGB( 172,172,172 )));
    _SECTION_END(); 


  7. . I use 233 tick bars, therefore 234 tick is too late..
    How about 232 tick bars :)

    These are elementary EL questions which you can ask on the MC tssupport forum.

     

    The fact is you are having a short circuit logic problem in your thinking. By definition, you can't know the H or the L of a bar until the bar is closed. You can however, create a derivative of price that can meet a certain criteria (often this is called an indicator), so that the condition is met intrabar. IOG (Intrabar order generation) logic was created for such purposes.


  8. How can I make strategy with this code

     

    I added bold line in this code and delete plot line

    if C < triggerPriceSell and

    highest(high,highBarsAgo) < hightoBeat

    and (H[highBarsAgo]-L[lowBarsAgo])>= MinimumDiff then begin

    sell next bar on market // ADDED

     

    if C > triggerPriceBuy and

    lowest(L,lowBarsAgo) > lowtoBeat

    and (H[highBarsAgo]-L[lowBarsAgo])>= MinimumDiff then begin

    Buy next bar on market // ADDED

     

     

    but it shows totally diffirent buy/sell signal with indicator

    Im not good at EL and strategy

    Sure, we all love to be able to buy or sell something 5 or 10 bars ago.


  9. I apologize for posting in the wrong room.

    Perhaps you could post the answer you got from the TS forum? ... but I think not. There are those who would take and take and never return anything.

    mike@emini-pro

    385 Posts

    Posted - 01/09/2010 20:22:54

    Trying to create or modify (or locate) the WMA indicator or WMA function in the WMA indicator to make volume the weighting factor instead of price...Any help or info greatly appreciated..

     

    mike@emini-pro

    Posted - 01/10/2010 13:36:17

    Bakrob....VWAP_SMA cannot be used as a function name and the attachment link leads to a blank page???If you already have the ELD for the VWAP indicator, could you just email the ELD to me? mpfitz@cox.net

     

    Thanks, Mike


  10. You missed my entire point....

     

    Ben has NO AUTHORITY, so he is just another minion of the Central Bankers with nothing buy lies. ;)

    You don't have a point.

    You claim, therefore you are right?

    Should congress decide to take away the Federal reserve's authority on monetary policy?Let them. Let's see how long international trade and currency flow will function without central banks. Let's see how long the trading exchanges and bourses will run before they shut down without credit.


  11. Only if you like to hear the continuous lies of the Central Bankers minions! :puke:
    As far as I can tell, Bernanke has always been an academician or a public servant. He never worked for Goldman Sachs, taken any campaign contributions or taken a bonus from wall street. Heck, he hasn't even sold an indicator or a trading course on the internet.

     

    It is easy to demonize a public servant for any mistakes they may or may not have made because it is a lot easier to be a critic than a governor. If there is any legitimate conflicts, collusions or misconduct, a public servant should quit or be fired. However, I don't see anything in Bernanke that suggested he wasn't just doing his job in the interest of the American people.


  12. Software Support number is 1-800-292-3442 for subscription clients. Their recorded message may asked you to please call back during their normal business hours... which are: 8:00 am to 6:30 pm Eastern time. Brokerage clients has a different number and longer support hours.

     

    You will need to post your TS version number and installation error message.

     

    Sometimes you can solve this problem by re-verifying the built in studies, but your description of the protected studies suggest the problem is with the specific version incompatibility (ie, there may be a newer version of TS that will install properly).

     

    You can import any of the built-in analysis techniques from the file TSPRO.ELD. This file is located, by default, in your installation's equivalent of the following subdirectory:

     

    C: \Program Files\TradeStation 8.X (Build ABCD)\MyWork\

     

    To import an analysis technique from this file, begin by following the File -> Import/Export EasyLanguage menu sequence. Then follow the steps in the Import/Export Wizard.


  13. Hi Oakbrook,

    It doesn't help to just cut and paste what other forum members had shown you.

     

    Have you had a chance to look at the free TS tutorial?

     

    Here are some links and references that may be helpful to you if you are just beginning to learn EasyLanguage:

     

    Introduction to EasyLanguage Tutorial

     

    Introduction to EasyLanguage Online Seminar

     

    EasyLanguage Books ("Getting Started with TradeStation EasyLanguage", “TradeStation EasyLanguage Reference Guide", and “EasyLanguage Boot Camp”)

     

    EasyLanguage FAQ

     

    List of EasyLanguage Reference Posts

     

    Seminar Schedule

     

    Demonstration Code: A source of demonstration code is the EasyLanguage “work area”, the body of strategies and analysis techniques the EasyLanguage code for which is included in TradeStation. This code can be opened and reviewed any time by following the File -> Open EasyLanguage Document menu sequence.

     

    Third-Party EasyLanguage Specialists Directory (This link takes you to a web page hosted by TradeStation Technologies, Inc., an affiliate of TradeStation Securities, Inc.)

     

    What you want is probably something like this, but it is really up to you to debug and figure out the logic:

     

    inputs: CompBars(6), UpColor(Blue), DnColor(Red), BarWidth(1); 
    
    vars: haClose(0), haOpen(0), color(0); 
    
    if BarNumber = 1 then 
    begin 
    haOpen = open; 
    haClose = (O+H+L+C)/4; 
    end; 
    
    if BarNumber > 1 then 
    begin 
    haClose = (O+H+L+C)/4; 
    haOpen = (haOpen [1] + haClose [1])/2 ; 
    
    { ......................... ......................... ......................... ..... } 
    
    if haClose > haOpen then color = UpColor 
    else color = DnColor; 
    
    for value1 = 1 to CompBars 
    begin 
    if haOpen <= MaxList(haOpen[value1],haClose[value1]) and 
    haOpen >= MinList(haOpen[value1],haClose[value1]) and 
    haClose <= MaxList(haOpen[value1],haClose[value1]) and 
    haClose >= MinList(haOpen[value1],haClose[value1]) then 
    color = color[value1]; 
    end; 
    
    
    if color = UpColor then 
    buy next bar at market 
    else 
    if color = DnColor then 
    sell short next bar at market ;
    End; 
    

    2009-11-30_150250.gif.ec00918c92aa5c311e7a779219eb3d79.gif


  14. CEO Eric Schmidt was asked about how Chrome was doing. Here’s an excerpt

    A Conversation With Sergey Brin And Eric Schmidt

    Q: You keep adding to Chrome and nobody seems to be paying attention. If that is one of the places where the battle is fought you seem pretty far behind.

     

    Sergey: Perhaps that is true in media . . .

     

    Schmidt: let me, some of your assumptions about Chrome adoption are wrong. The adoption rate of Chrome is [very strong]. We are going to do a better job of getting that message out.

     

    Schonfeld: Steve Ballmer calls it a rounding error, is it?

     

    Schmidt: I don’t respond to Steve Ballmer questions. Next question?


  15. These Waldo patterns are not as amusing as they seemed and they are hard to spot at times. Waldo #2 is generally back plotted by one bar (ie, plot1[1] ) whilst Waldo #3 is plotted in real time or end of bar.

     

    The EOD reversal today (11-19-2009) or beginning of a reversal in ES showed the efficacy of this pattern (Waldo #2, yellow dot at 13:00 exchange time).

     

    attachment.php?attachmentid=15571&stc=1&d=1258665033

     

    http://books.google.com/books?id=GZtlA991lNYC&pg=PT199&lpg=PT199&dq=demark+waldo&source=bl&ots=GsiDAoHonR&sig=nKmYjAteHAV1_DxVu20rxx3uuqU&hl=en&ei=yLIFS7vCBoH_nAfd5PjJCw&sa=X&oi=book_result&ct=result&resnum=5&ved=0CBAQ6AEwBA#v=onepage&q=demark%20waldo&f=false

    Waldo2_3ani.gif.f3d83276335533ff350a39b6909aac41.gif


  16. I've been playing around with some range charts in TradeStation lately trying to use them as a way to more cleanly interpret price...

     

    So what gives - it doesn't work in real time?

     

    You are showing the oscillation of tick data over 15 min when you set the range setting like you did. This is the instruction from TS.

     

    Range defines the specific price range for each of the Range Bars.

     

    The Range value must be greater than the min. movement for the symbol, and should be evenly divisible by the min. movement or rounding errors may occur.

     

    The Interval setting specifies the interval of the data used to build the Range Bars. The appropriate interval depends on your market perspective. Users with a short-term perspective may benefit from using smaller intervals (more precision/noise). Users with a long-term perspective may benefit from larger intervals (less precision/noise).

     

    Important: Whenever an Interval setting greater than 1 tick is being used, it is important that the Range value is larger than the typical oscillation for that specific interval. If the Range value is too small, more Range Bars may be created in real-time, as a result of the real-time price oscillations within the interval, than will be created when the Range Bars are built historically. Specific examples of this behavior are provided in the TradeStation Help.

    attachment.php?attachmentid=15158&stc=1&d=1258034122

    2009-11-12_085300.gif.de4cb93484171e0d4e0cdd3e142ddb53.gif

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.