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.

spyro

Members
  • Content Count

    28
  • Joined

  • Last visited

Posts posted by spyro


  1. Hey

     

    Last week I found this wonderful ensign software very useable software

     

    Because the great tool that called DYO "design your own"

     

    Its very easy way to code and make your freestyle indicators without know

     

    To program in high level

     

    I attached (in the links there is pictures)here some ideas that I found on the net and hope members

     

    That have some good ideas will share it with us

     

    Thanks.

     

     

    Question:

     

    New to the software, great stuff, been reading dye studies on knowledge base to try to understand things. Wrote one and when plotting in real time the chart tends to blend/obscure the histogram until I click on the chart and change the bar spacing. I was trying to get it to show the total ask or bid as a black line on whatever side the indicator value was. It would look like a candlestick chart but only on ones side of the zero line depending on value. I got it to plot but the bar for total volume was on both sides of zero.

     

    Answer:

     

    I wish you had shown me an example since I feel you left a lot for me to guess at. The following is what I think you are trying to accomplish.

     

    http://www.ensignsupport.com/email/1608.mhtml

     

     

     

     

     

     

     

     

     

    Question:

     

    Finally with a little trouble yesterday it is working. I think there was a conflict with my global variables but it is working today. I am wondering, can you think of a way to look for contracts in a range of say 10-20 rather than just greater that 10? I am also wondering could I record the buy or sell pressure associated with the larger contract size? Thank you very much for your help with this. I really appreciate your efforts and you. If there is anything I can do for you let me know.

     

    Answer:

     

    There is not a conflict of GVs. The same template can be used on multiple charts. Since the DYO works with volume, on the chart property form uncheck the option for Optimize Speed. The DYO is not being called on a equal price tick, which might also have tick volume at the large size you want to track. When the Optimize Speed option is checked, studies are not recalculate when the price is unchanged from the prior tick, which is fine for most studies because they work with just price.

     

    You would add more logic lines to test for <20 like this using Lines F, G and H for the test.

     

     

    http://www.ensignsupport.com/email/1643.mhtml

     

     

     

     

     

     

     

     

     

    Question:

     

    I have been mucking around with bid-ask delta, trying to get an idea going. For each bar I want to see the Maximum and Minimum that the delta reached (delta being the volume traded at bid - volume traded at ask), but I also want to see the delta at which the bar closed out. So the final bar delta gets plotted as a thick bar in the direction of above/below zero as appropriate, while the max and min get plotted as thin lines. I guess if one wanted to, you could plot the thin line over the thick one, in order to see the whole delta range. A proper scale would be nice.

     

    If I can get this then I'd like to use the values to generate an alert - which would obviously be quite easy once the basic data was in place. I just can't seem to get this thing to plot properly and wondered if you could find time to have a go at it?

     

    Answer:

     

    This DYO will do the current delta and the Max and Min. The thing this example does not do well is be able to compute the Max and the Min for the past.

    However, in real-time it will work just fine and plot. You may need to adjust the scale range to make it scale nicely.

     

    http://www.ensignsupport.com/email/1664.mhtml

     

     

     

     

     

     

     

     

     

    Question:

     

    What I would like to do is keep a running total of the bids and a running total of the asks. So the market opens we have 1,2,3,4,5,6 at the bid and 1,2,3,4, at the ask, we are now -2 plotted with red bars below the zero line. Then we 5,6,7,8,9, at the ask and none at the bid, we are now +3 for the day plotted with a green bar or line that changes green once we go positive. I am only interested in larger lot sizes so it would only keep count on lot sizes over 20.

    Answer:

     

    I watched it today and other than changing the fixed range of the plot scale, it looked pretty good. This is 5-min ES chart.

     

     

     

    Here is my implementation using DYOs. Also, I see it is important on your chart property form to uncheck the Optimize Speed option so the DYO evaluates on every tick, including equal ticks, otherwise the Optimize Speed option makes the calculation blind on equal ticks, which would cause it to miss counts you are interested in.

     

     

     

     

    http://www.ensignsupport.com/email/663.mhtml


  2. Sorry to freak you out :)

     

    Yes, I'm using Ninja. And I'll tell you the logic on one condition: if you find it useful, you'll tell me about it :)

     

    The tradestation frequency one is a little tricky. Tradestation does not give you fine grained time at all. You have to use a dll to get system time. It also won't work historically of course--only live. There is a dll for system time you can get--search the forums for it. And there's the limitation on whether a transaction was at bid or ask--it probably works most of the time, I'm not sure how often its a problem.

     

    I don't think I tried to do the frequency on tradestation. I got rid of tradestation a month or two ago--these types of serious limitations get rather frustrating.

     

    As for the logic, it's:

     

    volume / (log( currentTime - lastAskTime ) + 1)

     

    Ah this is why sometimes it doesn't plot--if we get two simultaneous ones, the log goes to infinity--that happened once in the screenshot.

     

    lastAskTime would be lastBidTime if this tick was at bid. Track them separately.

     

    I took the log of time diff because otherwise it can have some enormous spikes I think, and so squish everything down.

     

    The plot in screenshot has two histograms--one up and one down: bid and ask, one negated so it displays below 0. Also that plot adds up the frequency over a bar--then each bar it starts over at 0. The yellow line is the 7 ema of the difference between the two, again by tick, not bar.

     

    Here's the code if you want to decipher, but everyone has to promise not to judge me by this code as it was just slapped together and messed around with as I experimented with different things... so it's ugly.

     

    If someone determines refinements that will make it especially useful, I can implement them and clean it up.

     

     

    		protected override void OnMarketData(MarketDataEventArgs e) 
    	{
    		long now = DateTime.Now.Ticks;
    		if (e.MarketDataType == MarketDataType.Ask) {
    			lastAsk = e.Price;
    			lastAskTime = now;
    		}
    		else if (e.MarketDataType == MarketDataType.Bid) {
    			lastBid = e.Price;
    			lastBidTime = now;
    		}
    		else if (lastAsk != 0 && lastBid != 0 && e.MarketDataType == MarketDataType.Last && e.Volume >= minVol) {
    			// TODO: for in between bid and ask?
    			if (e.Price >= lastAsk && e.Price > lastBid) {
    				double dur = Math.Log((double)now - lastAskTime+1) + 1;
    				double newFreq = (double)e.Volume/dur;
    				double oldFreq = askFreq;
    //					askFreq = (newFreq - askFreq)*mult + askFreq;
    				askFreq = (newFreq)*mult + askFreq;
    				if (Math.Abs(askFreq - oldFreq) < oldFreq/1000) {
    					Print("Ask no change: "+e.Volume+", "+(now-lastAskTime)+", "+dur+", "+newFreq+", "+oldFreq+", "+askFreq);
    				}
    				lastAskTime = now;
    			} else if (e.Price <= lastBid && e.Price < lastAsk) {
    				double dur = Math.Log((double)now - lastBidTime+1) + 1;
    				double newFreq = (double)e.Volume/dur;
    				double oldFreq = bidFreq;
    //					bidFreq = (newFreq - bidFreq)*mult + bidFreq;
    				bidFreq = (newFreq)*mult + bidFreq;
    				if (Math.Abs(bidFreq - oldFreq) < oldFreq/1000) {
    					Print("Bid no change: "+e.Volume+", "+(now-lastBidTime)+", "+newFreq+", "+oldFreq+", "+bidFreq);
    				}
    				lastBidTime = now;
    			} else {
    				Print("Was inside bid/ask: "+e.Price);
    			}
    		}
    	}
    
           /// <summary>
           /// Called on each bar update event (incoming tick)
           /// </summary>
           protected override void OnBarUpdate()
           {
    		if (FirstTickOfBar) {
    			bidFreq = 0;
    			askFreq = 0;
    			diffEma = diffEmaBar;
    			diffEmaBar = 0.0;
    		} else {
    			double diff = askFreq - bidFreq;
    			if (diffEma == 0.0) {
    				diffEmaBar = diff;
    			} else {
    				diffEmaBar = (2.0/(1.0+7.0))*(diff - diffEma)+diffEma;
    			}
    			Plot0.Set(diffEmaBar);
    			Plot1.Set(-bidFreq);
    			Plot2.Set(askFreq);
    		}
           }

     

     

    thank you taotree for the code

     

    can i ask you please to export it from your ninjatrader to zip file

     

    because i have problem to copy and past it in my editor

     

    thanks alot


  3. The idea here is similar to the ADX indicator. It is a way to show how volatile price is relative to the volume weighted price (VWAP) and compare it to the past 3 days at the same point in the day (it should be used on 2-min chart to properly reference the prior 3 days).

     

    Market tends to move from range into trend and trend into range. The idea here was to show if price is trending or in a range. Sometimes, price moves away from VWAP consistently for hours -- this is a trend. Other times, VWAP is a magnet as the market coils.

     

    hey frank!!

     

    are u the frank from this web blog?

    :cool:


  4. nop im not him..

     

    its the first time that i saw this page :)

     

    my friend send me this indicators by mail and i just share it.

     

    but there is nothing to understand just use them like they wrote and change the time like you said

     

    very simple i think so....:)


  5. vars:

    PriceW(0),

    ShareW(0),

    Count(0),

    VolWAPValue(0),

    VolWAPVariance(0),

    VolWAPSD(0),

    aa(0),

    bb(0),

    cc(0),

    dd(0),

    ee(0);

     

    if date > date[1] then begin

    PriceW = 0;

    ShareW = 0;

    Count = -1;

    Value1 = 0;

    Value2 = 0;

    VolWAPValue = 0;

    end;

    PriceW = PriceW + (AvgPrice * (UpTicks+DownTicks));

    ShareW = ShareW + (UpTicks+DownTicks);

    Count = Count + 1;

    Value3 = 0;

    if ShareW > 0 then VolWAPValue = PriceW / ShareW;

    {Calculate the individual variance terms for each intraday bar starting with the current

    bar and looping back through each bar to the start bar. The terms are each normalized

    according to the Variance formula for each level of volume at each price bar }

    For Value1 = 0 To Count Begin

    Value2 = ((UpTicks[Value1]+DownTicks[Value1])/ShareW) * (Square(AvgPrice[Value1]-VolWAPValue));

    Value3 = Value3 + Value2;

    End;

    VolWAPVariance = Value3;

    VolWAPSD = SquareRoot(VolWAPVariance);

    value1=volwapsd;

     

    if time=600 then aa=volwapsd;

    if time=700 then bb=volwapsd;

    if time=800 then cc=volwapsd;

    if time=900 then dd=volwapsd;

    if time=1000 then ee=volwapsd;

     

    if time>500 and time<600 then

    plot2(aa,"am");

     

    if time>600 and time<700 then

    plot2(bb,"am");

     

    if time>700 and time<800 then

    plot2(cc,"am");

     

    if time>800 and time<900 then

    plot2(dd,"am");

     

    if time>900 and time<1000 then

    plot2(ee,"am");

     

     

    value2=(value1[203]+value1[406]+value1[609])/3;

    value3=(value1+value2)/2;

    value4=value3*2;

    Plot1(value1, "vwap");

    {Plot3(value3, "Avg of Avg");}

     

     

     

     

    April+3+2008.png

    enjoy:cool:


  6. vars:

    PriceW(0), ShareW(0), Count(0), VolWAPValue(0), VolWAPVariance(0), VolWAPSD(0), aa(0), bb(0);

     

    if date > date[1] then begin

    PriceW = 0; ShareW = 0; Count = -1; Value1 = 0; Value2 = 0; VolWAPValue = 0; end;

    PriceW = PriceW + (AvgPrice * (UpTicks+DownTicks));

    ShareW = ShareW + (UpTicks+DownTicks);

    Count = Count + 1;

    Value3 = 0;

    if ShareW > 0 then VolWAPValue = PriceW / ShareW;

    For Value1 = 0 To Count Begin

    Value2 = ((UpTicks[Value1]+DownTicks[Value1])/ShareW) * (Square(AvgPrice[Value1]-VolWAPValue));

    Value3 = Value3 + Value2;

    End;

    VolWAPVariance = Value3;

    VolWAPSD = SquareRoot(VolWAPVariance);

    value1=volwapsd;

    value2=(value1[203]+value1[406]+value1[609])/3;

    value3=(value1+value2)/2;

    value4=value3*2;

     

    Plot1(value1, "vwap");

    if time<1100 then begin

    Plot2(value2, "3-Day Avg");

    end;

    if time>1000 then begin

    Plot4(4.25,"-");

    Plot6(6.25,"+");

    end;

     

    condition1=time>630 and time<730;

    condition2=time>730 and time<830;

    condition3=time>830 and time<930;

    condition4=time>930 and time<1030;

    condition5=time>1030 and time<1130;

    condition6=time>1130 and time<1315;

     

    if condition1 then

    setplotcolor(2, blue);

    if condition2 then

    setplotcolor(2, red);

    if condition3 then

    setplotcolor(2, blue);

    if condition4 then

    setplotcolor(2, red);

    if condition5 then

    setplotcolor(2, blue);

    if condition6 then

    setplotcolor(2, red);

     

     

     

    ;)


  7. Here you go ...........

     

     

     

    inputs:

    Period(20),

    UpColor(green),

    DownColor(red);

     

    variables:

    MyVol(0),

    Color(yellow),

    SmoothedBA(0),

    Length(squareroot(Period)),

    intrabarpersist MyCurrentBar(0),

    intrabarpersist VolumeAtBid(0),

    intrabarpersist VolumeAtAsk(0),

    intrabarpersist BAVolRatio(0),

    intrabarpersist VolTmp(0);

     

    if LastBarOnChart and BarStatus(1) <> 2 then begin

    MyVol = Iff(BarType < 2, Ticks, Volume);

    if CurrentBar > MyCurrentBar then begin

    VolumeAtBid = 0;

    VolumeAtAsk = 0;

    BAVolRatio = 0;

    VolTmp = 0;

    MyCurrentBar = CurrentBar;

    end;

    if InsideBid < InsideAsk then begin

    if Close <= InsideBid then

    VolumeAtBid = VolumeAtBid + MyVol - VolTmp

    else if Close >= InsideAsk then

    VolumeAtAsk = VolumeAtAsk + MyVol - VolTmp ;

    end;

    if VolumeAtBid > 0 and VolumeAtAsk > 0 then BAVolRatio = Log( VolumeAtAsk / VolumeAtBid );

    VolTmp = MyVol ;

    end ;

    SmoothedBA = xaverage(xaverage(BAvolratio, Length), Length);

    if SmoothedBA <= 0 then color = DownColor else color = UpColor;

     

    plot1(SmoothedBA, "Pressure", color);

    Plot2( 0, "ZeroLine" ) ;

     

     

    Cheers

     

    Blu-Ray

     

     

     

    hey blu my freind..

     

    little question .... can you maby put in this indicator upgrade with

    option that you can filter the volume of the contracts so we can for example filter to 100 contracts only and see just the big boys way ?

     

    thanks alot

     

     

    :)


  8. hey

     

     

    there is a plugin to take data from open e cry to multicharts

     

    someone use it ?

     

    when i try to connect i got all the time "not registred at the log" in the quote manager

     

    and i have multicharts account and open e cry account too..

     

     

    thanks alot


  9. inputs:

     

    ATRPeriod(9), //Number of ATR Periods

     

    ATRMulti(2.0), // ATR Multiplier

     

     

     

    StrengthSensitivity(2), //Pivot Strength

     

     

     

    ShowZigZagLines(True),

     

    ShowZigZagCount(True),

     

    ShowZigZagTime(True),

     

    ZigZagLineColorUp(BLUE),

     

    ZigZagLineColorDN(CYAN),

     

    ZigZagLineWidth(1),

     

    ZigZagLineStyle(Tool_Solid),

     

    ZigZagTextColor(CYAN),

     

    VertOffset1(1),

     

    VertOffset2(2), // Second String on Swing Hi/Lows

     

    DecimalPlaces(2);

     

     

     

    vars:

     

    NewSwingPrice(0),

     

    LastSwingPrice(0),

     

    SwingPrice(High),

     

    SwingDate(Date),

     

    SwingTime(Time),

     

    TLDir(0), { TLDir = -1 implies prev TL dn, +1 implies prev TL up }

     

    SaveSwing(false),

     

    AddTL(false),

     

    UpdateTL(false),

     

    TLRef(0),

     

    TLSwing(0),

     

    PeakTextRef(0),PeakTextRef2(0),

     

    PeakStr(""), PeakStr2(""),

     

    Diff(0),

     

    ArrayMax (17),

     

    ATRPoints(0),

     

    BarDiff(0), TimeDiff(0),

     

    ZigZagCount(0),

     

    ZZCountStr(""),

     

    x(0),

     

    showDebug(FALSE);

     

     

     

     

     

    Arrays:

     

    TrendLine[17] (0), DayValue[17] (0), ZigZag[1000,3](0);

     

     

     

    if CurrentBar = 1 then

     

    begin

     

    for x=0 to ArrayMax { Draw Fib Lines }

     

    begin

     

    if x <= ArrayMax then

     

    begin

     

    TrendLine[x] = TL_New (Date[1], Time[1], Low, Date, Time, Low);

     

     

     

    TL_SetExtLeft (TrendLine[x], false);

     

    TL_SetExtRight (TrendLine[x], True);

     

    end; // if

     

    end; // for

     

    end; //if currentbar

     

     

     

    { Candidate swings are just-confirmed, 3-bar (Str=1), SwingHi's and SwingLo's }

     

    NewSwingPrice = SwingHigh( 1, High, StrengthSensitivity, StrengthSensitivity+1);

     

     

     

     

     

    ATRPoints = ATRMulti*AvgTrueRange(ATRPeriod) ;

     

     

     

    if NewSwingPrice <> -1 then

     

    begin

     

    if (TLDir <= 0 and NewSwingPrice >= SwingPrice + ATRPoints) then

     

    { prepare to add new up TL }

     

    begin

     

    SaveSwing = true;

     

    AddTL = true;

     

    TLDir = 1;

     

    end

     

    else

     

    if TLDir = 1 and NewSwingPrice >= SwingPrice then { prepare to update prev up TL }

     

    begin

     

    SaveSwing = true;

     

    UpdateTL = true;

     

    end;

     

    end

     

    else

     

    begin

     

    { NewSwingPrice = SwingLow( 1, Low, 1, 2 ); }

     

    NewSwingPrice = SwingLow( 1, Low, StrengthSensitivity, StrengthSensitivity+1);

     

     

     

    if NewSwingPrice <> -1 then

     

    begin { prepare to add new dn TL }

     

    if TLDir >= 0 and NewSwingPrice <= SwingPrice - ATRPoints then

     

    begin

     

    SaveSwing = true;

     

    AddTL = true;

     

    TLDir = -1;

     

    end

     

    else

     

    if TLDir = -1 and NewSwingPrice <= SwingPrice then { prepare to update prev dn TL }

     

    begin

     

    SaveSwing = true;

     

    UpdateTL = true ;

     

    end;

     

    end;

     

    end;

     

     

     

    if SaveSwing then { save new swing and reset SaveSwing }

     

    begin

     

    SwingPrice = NewSwingPrice ;

     

    SwingDate = Date[strengthSensitivity];

     

    SwingTime = Time[strengthSensitivity];

     

    // SaveSwing = false ;

     

    end ;

     

    if (showDebug) then

     

    print(" AddTL === ", AddTL, " UpdateTL == ", UpdateTL, "SaveSwing == ", SaveSwing, " TL Dir = ", TLDir);

     

     

     

    { add new TL and reset AddTL }

     

    if AddTL then

     

    begin

     

    PeakTextRef = Text_New(Date, Time, Close, " ");

     

    Text_SetColor(PeakTextRef, ZigZagTextColor);

     

     

     

    if (ShowZigZagTime) then

     

    begin

     

    PeakTextRef2 = Text_New(Date, Time, Close, " ");

     

    Text_SetColor(PeakTextRef2, ZigZagTextColor);

     

    end;

     

     

     

    if ShowZigZagLines then

     

    begin

     

    TLRef = TL_New(SwingDate, SwingTime, SwingPrice, SwingDate[1], SwingTime[1],SwingPrice[1]);

     

    Text_SetStyle(PeakTextRef, 2, 2);

     

    Text_SetStyle(PeakTextRef2, 2, 3);

     

    TL_SetExtLeft( TLRef, false);

     

    TL_SetExtRight( TLRef, false);

     

    TL_SetSize( TLRef, ZigZagLineWidth);

     

    if TLDir = -1 then

     

    TL_SetColor( TLRef, ZigZagLineColorDN)

     

    else

     

    TL_SetColor( TLRef, ZigZagLineColorUp);

     

     

     

    LastSwingPrice = SwingPrice[1];

     

    end;

     

     

     

    if (TLDir[1] <> TLDir[2]) then BarDiff = 0

     

    else BarDiff = BarDiff +1;

     

     

     

    ZigZagCount = ZigZagCount + 1;

     

     

     

    ZigZag[ZigZagCount,1] = SwingPrice; // Current Swing Price

     

    ZigZag[ZigZagCount,2] = BarNumber; // BarNum

     

    ZigZag[ZigZagCount,3] = TimetoMinutes(Time); // Time Var

     

     

     

    BarDiff = ZigZag[ZigZagCount,2] - ZigZag[ZigZagCount-1,2];

     

     

     

    if (showZigZagCount) then

     

    ZZCountStr = "[" + NumToStr(ZigZagCount,0) +"] "

     

    else

     

    ZZCountStr = "";

     

     

     

    if TLDir = -1 then

     

    Diff = LastSwingPrice - SwingPrice

     

    else

     

    Diff = SwingPrice - LastSwingPrice;

     

     

     

    TimeDiff = Zigzag[ZigZagcount,3] - Zigzag[ZigZagcount-1,3];

     

    {jmh}

     

    { PeakStr = ZZCountStr + " " + NumToStr(SwingPrice,DecimalPlaces) + " / " + NumToStr(Diff, DecimalPlaces);

     

    PeakStr2 = ELTimetoString(MinutestoTime(ZigZag[ZigZagCount,3])) + " / " + NumtoStr(BarDiff,0)+ " / " + NumtoStr(TimeDiff,0);}

     

    PeakStr = NumToStr(SwingPrice,DecimalPlaces) + " / " + NumToStr(Diff, DecimalPlaces) ;

     

    PeakStr2 = " ";

     

     

     

     

     

    Text_SetString(PeakTextRef, PeakStr);

     

    if TLDir = -1 then

     

    Text_SetLocation(PeakTextRef, SwingDate, SwingTime, SwingPrice - VertOffset1)

     

    else

     

    Text_SetLocation(PeakTextRef, SwingDate, SwingTime, SwingPrice + VertOffset2);

     

     

     

     

     

    if (ShowZigZagTime) then

     

    begin

     

    Text_SetString(PeakTextRef2, PeakStr2);

     

    if TLDir = -1 then

     

    Text_SetLocation(PeakTextRef2, SwingDate, SwingTime, SwingPrice - VertOffset2)

     

    else

     

    Text_SetLocation(PeakTextRef2, SwingDate, SwingTime, SwingPrice + VertOffset1);

     

    end;

     

     

     

     

     

    AddTL = false;

     

    end

     

    else if UpdateTL then { update prev TL and reset UpdateTL }

     

    begin

     

    if ShowZigZagLines then

     

    TL_SetEnd( TLRef, SwingDate, SwingTime, SwingPrice);

     

     

     

    if (TLDir[1] <> TLDir[2]) then BarDiff = 0

     

    else BarDiff = BarDiff +1;

     

     

     

    ZigZag[ZigZagCount,1] = SwingPrice; // Current Swing Price

     

    ZigZag[ZigZagCount,2] = BarNumber[1]; // BarNum

     

    ZigZag[ZigZagCount,3] = TimetoMinutes(Time); // Time Var

     

     

     

     

     

    BarDiff = ZigZag[ZigZagCount,2] - ZigZag[ZigZagCount-1,2];

     

     

     

    if (showZigZagCount) then

     

    ZZCountStr = "[" + NumToStr(ZigZagCount,0) +"] "

     

    else

     

    ZZCountStr = "";

     

     

     

    if TLDir = -1 then

     

    Diff = LastSwingPrice - SwingPrice

     

    else

     

    Diff = SwingPrice - LastSwingPrice;

     

     

     

    TimeDiff = Zigzag[ZigZagcount,3] - Zigzag[ZigZagcount-1,3];

     

     

     

    { PeakStr = ZZCountStr + "" + NumToStr(SwingPrice,DecimalPlaces) + " / " + NumToStr(Diff, DecimalPlaces);}

     

    PeakStr = NumToStr(SwingPrice,DecimalPlaces) + " / " + NumToStr(Diff, DecimalPlaces);

     

    PeakStr2 = " ";

     

    { PeakStr2 = ELTimetoString(MinutestoTime(ZigZag[ZigZagCount,3])) + " / " + NumtoStr(BarDiff,0)+ " / " + NumtoStr(TimeDiff,0);}

     

     

     

    Text_SetString( PeakTextRef, PeakStr);

     

     

     

    if TLDir = -1 then

     

    Text_SetLocation(PeakTextRef, SwingDate, SwingTime, SwingPrice - VertOffset1)

     

    else

     

    Text_SetLocation(PeakTextRef, SwingDate, SwingTime, SwingPrice + VertOffset2);

     

     

     

    if (ShowZigZagTime) then

     

    begin

     

    Text_SetString(PeakTextRef2, PeakStr2);

     

    if TLDir = -1 then

     

    Text_SetLocation(PeakTextRef2, SwingDate, SwingTime, SwingPrice - VertOffset2)

     

    else

     

    Text_SetLocation(PeakTextRef2, SwingDate, SwingTime, SwingPrice + VertOffset1);

     

    end;

     

     

     

    UpdateTL = false;

     

    end;

     

     

     

    if SaveSwing then

     

    begin

     

    if TLDir = -1 then

     

    begin

     

    DayValue[0] = Swingprice;

     

    DayValue[1] = LastSwingprice;

     

    end

     

    else

     

    begin

     

    DayValue[1] = Swingprice;

     

    DayValue[0] = LastSwingprice;

     

    end;

     

    Diff = DayValue[0] - DayValue[1];

     

     

     

    if (showDebug) then

     

    print("Day0 = ", DayValue[0], " DayMax= ", DayValue[1], " Diff =", Diff, " TLDir = ", TLDir);

     

     

     

     

     

     

     

    for x=0 to ArrayMax

     

    begin

     

    if TrendLine[x] > 0 then

     

    begin

     

    { SetEnd before SetBegin }

     

    TL_SetEnd (TrendLine[x], Date, Time, DayValue[x]);

     

    TL_SetBegin (TrendLine[x], Date, Time, DayValue[x]);

     

    end; // if TrendLine

     

    end; // for loop

     

    SaveSwing = False;

     

    end; // if SaveSwing

     

     

     

    ENJOY:cool:


  10. i have 3rd party software the have T&P with filter ...

     

    include footprint chart

     

     

    the only problem is that it works just on opentick data feed

     

    tell me if you want it ...:cool:

     

    im using it!!


  11. Profile Trend March 2008

     

     

     

     

    vars: vwap1(0), close1(0), aa(0), bb(0), cc(0), firstbar(0), length(0);

     

    if time=700 then aa=vwap_h;

    if time=730 then bb=vwap_h;

     

    cc=(aa+bb)/2;

     

    if date>date[1] then begin firstbar=currentbar;

    end;

    length=currentbar-firstbar;

     

    value1=h-aa;

    value2=l-aa;

     

    condition1=((h+l)/2)>cc;

    condition2=((h+l)/2)

    if condition1 and time>700 and time<1315 then

    plot1(value1,"cc");

    if condition2 and time>700 and time<1315 then

    plot2(value2,"cc");

     

     

     

    if time>829 and condition1 then

    setplotcolor(1,green);

    if time>829 and condition2 then

    setplotcolor(2,red);

     

    if time<829 then

    setplotcolor(1,white);

    if time<829 then

    setplotcolor(2,white);

     

    if time<829 then

    setplotwidth(1,1);

    if time<829 then

    setplotwidth(2,1);

     

    if time>829 and time<1300 then

    setplotwidth(1,3);

    if time>829 and time<1300 then

    setplotwidth(2,3);

     

     

     

    plot12(0,"0");

     

    {if value1>0 then begin

    setplotwidth(1,4);

    end;}

     

    if time=1300 then begin

    setplotwidth(1,4);

    end;

     

     

    if time=1300 then begin

    setplotwidth(2,4);

    end;

     

     

     

     

     

    Market Profile Momentum

     

     

    vars: vwap1(0), close1(0), aa(0), cc(0), firstbar(0), length(0);

     

    if time=1315 then vwap1=vwap_h;

     

    if time=1315 then close1=c;

     

    condition1=highestbar(h,12)condition2=lowestbar(l,12)

    aa=vwap_h;

     

    if date>date[1] then begin firstbar=currentbar;

    end;

    length=currentbar-firstbar;

     

    value8=10;

    value10=(highest(h,5)-lowest(aa,13))/value8;

    value11=(lowest(l,5)-highest(aa,13))/value8;

     

    if time=1300 and condition1 then

    plot1(value10,"cc");

     

    if time=1300 and condition2 then

    plot1(value11,"cc");

     

    plot4(2,"2");

    plot5(-2,"-2");

     

    if condition1 then

    setplotcolor(1,green)

    else

    setplotcolor(1,red);

     

     

    plot12(0,"0");

     

    if condition1 and value10>1.8 then begin

    setplotwidth(1,4);

    end;

     

    if condition2 and value11<-1.8 then begin

    setplotwidth(1,4);

    end;

     

    value20=Highd(0)-Highd(1);

     

    if time>629 and time<=900

    and

    value20>0

    then

     

    plot20(0.5,"Highs");

     

    value21=lowd(0)-lowd(1);

     

    if time>629 and time<=900

    and

    value21<0

    then

     

    plot21(-0.5,"Lows");

     

    setplotcolor(20, white);

    setplotcolor(21, white);

     

     

     

     

    little problem when i compiled it if some one can fix it ?

     

    thanks

×
×
  • Create New...

Important Information

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