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.

insideday

Members
  • Content Count

    30
  • Joined

  • Last visited

Posts posted by insideday


  1. Data1 is quotes/charts of one instrument and data2 is quotes/charts of another instrument.

     

    Sorry for the confusion, that was clear. What i mean is that i dont know the underlyings.

     

    Willimas Will-Spread is based on the Spread between Gold an Bonds, with Bonds as Data 1. But i dont know what he trades with Will-Val.


  2. Knytt : do you know how would that be for Tradestation ? cheers Walter.

     

     

    @Walter

     

    This is the code in Tradestation, but dont ask me what data1 and data2 is.

     

    Inputs: Price(Close of Data1/Close of Data2),Len1(22), Len2(2), 
    Len3(365), Buyzone(20), Sellzone(75);
    
    Value1 = XAverage(Price*100,Len1);
    Value2 = XAverage(Price*100,Len2);
    Value3 = Value1 - Value2;
    Value4 = (Value1-Value2) - Lowest(Value3,Len3);
    Value5 = Value4 / Highest(Value3,Len3) - Lowest(Value3,Len3);
    
    Plot1(Value5, "Wil-Val");
    Plot2 (BuyZone,"BuyZon");
    Plot3(SellZone,"SellZon");
    


  3. Hi, you could try it realtime with

     

    inputs: 
    UpColor(green), 
    DownColor(red); 
    
    variables: 
    
    MyVol(0), 
    Color(yellow), 
    intrabarpersist MyCurrentBar(0), 
    intrabarpersist VolumeAtBid(0), 
    intrabarpersist VolumeAtAsk(0), 
    intrabarpersist BAVolDiff(0), 
    intrabarpersist VolTmp(0); 
    
    if LastBarOnChart then begin 
      	MyVol = Iff(BarType < 2, Ticks, Volume); 
    if CurrentBar > MyCurrentBar then begin 
    	VolumeAtBid = 0; 
    	VolumeAtAsk = 0; 
    	BAVolDiff= 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	BAVolDiff= VolumeAtAsk-VolumeAtBid ; 
    VolTmp = MyVol ; 
    end ; 
    if BAVolDiff<= 0 then color = DownColor else color = UpColor; 
    
    plot1(BAVolDiff, "BAVolDiff", color); 
    Plot2( 0, "ZeroLine" ) ; 
    
    

     

    Make sure that you use Trade Volume on Format Symbol.

     

    Regards

×
×
  • Create New...

Important Information

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