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.

laski

Members
  • Content Count

    3
  • Joined

  • Last visited

Posts posted by laski


  1. Hello BlowFish and thank for your answer.

    Filtro can be used if you want to see only traded volume greater than a preset value, but is not so important.

    Furthermore in multicharts if the "Build Volume On" of the instrument is set to "trade Volume" and not to "Tick count" the instruction

    MyVolume=Ticks

    give you the volume traded for every tick.

    In your code there is this line

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

     

    that is the same thing of

    MyVol=Ticks 
    

    for intraday and tick by tick charts

     

    My dude is for this line

     

    if Close <= InsideBid then
    		Delta  = Delta - MyVol + VolTmp
    

     

    and this one

     

    else if Close >= InsideAsk then 
    		Delta = Delta + MyVol - VolTmp ;  
    

     

    where VolTmp is previous volume traded.

     

    In "Close<=InsideBid" case, volume is traded in Bidside so it is correct to subctrat MyVol from Delta, but I can't understand why you add the previous volume (VolTmp) regardless of it was traded in bidside or in askside (because the line:"Close <= InsideBid" is only referred to the last volume exchanged that is MyVol).

    The same thing happen for the line "Close >= InsideAsk

    Can you explain that?

     

    I hope you understand me, my english is not so good!:crap:

    Thanks,

    byebye

    MARCO


  2. Woops way to completely balls up :crap: I only changed a couple of lines and managed to get an additional end statement and undefined variable (block) as you guys pointed out. It's got to the stage where it needs a tidy up (as well as comments) but this should at least run

     

    
    inputs: 
    UpColor(darkgreen), 
    DownColor(red), 
    DeltaBar(1), 
    MaxBlock(9999),
    MinBlock(0),
    ResetDeltaEachBar(0); 
    
    variables: 
    MyVol(0), 
    Block(0),
    color(yellow), 
    intrabarpersist MyCurrentBar(0), 
    intrabarpersist VolumeAtBid(0), 
    intrabarpersist VolumeAtAsk(0), 
    intrabarpersist BAVolRatio(0), 
    intrabarpersist VolTmp(0), 
    intrabarpersist Delta (0), 
    intrabarpersist DeltaH (0), 
    intrabarpersist DeltaL (0), 
    intrabarpersist DeltaO (0); 
    
    if LastBarOnChart then begin 
      	MyVol = Iff(BarType < 2, Ticks, Volume); 
    if CurrentBar > MyCurrentBar then begin 
    	VolumeAtBid = 0; 
    	VolumeAtAsk = 0; 
    	BAVolRatio = 0; 
    	VolTmp = 0; 
    	MyCurrentBar = CurrentBar; 
    	if ResetDeltaEachbar = 1 then Delta =0;
    	DeltaO = Delta; 
    	DeltaH = Delta; 
    	DeltaL = Delta; 
    end; 
    Block = Myvol - VolTmp;
    if (Block >= MinBlock) and (Block <= MaxBlock) then
    	if Close <= InsideBid then
    		Delta  = Delta - MyVol + VolTmp
    	else if Close >= InsideAsk then 
    		Delta = Delta + MyVol - VolTmp ;  
    	VolTmp = MyVol ;
    end; 
    
    
    DeltaH = maxlist(DeltaH, Delta); 
    DeltaL = minlist(DeltaL, Delta); 
    
    
    if Delta <= 0 then color = DownColor else color = UpColor; 
    
    plot1(DeltaO, "DO"); 
    Plot2(DeltaH, "DH"); 
    Plot3(DeltaL, "DL"); 
    plot4(Delta, "DC");	 
    
    

     

    Hello, I'm new to this forum.

    I see this code and I think that it is better to change this line:

     

    
    if Close <= InsideBid then
    		Delta  = Delta - MyVol + VolTmp
    	else if Close >= InsideAsk then 
    		Delta = Delta + MyVol - VolTmp ;  
    	VolTmp = MyVol ;
    end; 
    

     

    with this one:

     

    
    if ticks>=filtro then begin
    	if Close>= insideask then Delta=Delta+Ticks;
    	if Close<= insidebid then Delta=Delta-Ticks;
    end;
    

     

    in this way I'have the real sum of volume exchanged in bidside less the volume exchanged in askside.

    Is it correct?

     

    MARCO


  3. Woops way to completely balls up :crap: I only changed a couple of lines and managed to get an additional end statement and undefined variable (block) as you guys pointed out. It's got to the stage where it needs a tidy up (as well as comments) but this should at least run

     

    
    inputs: 
    UpColor(darkgreen), 
    DownColor(red), 
    DeltaBar(1), 
    MaxBlock(9999),
    MinBlock(0),
    ResetDeltaEachBar(0); 
    
    variables: 
    MyVol(0), 
    Block(0),
    color(yellow), 
    intrabarpersist MyCurrentBar(0), 
    intrabarpersist VolumeAtBid(0), 
    intrabarpersist VolumeAtAsk(0), 
    intrabarpersist BAVolRatio(0), 
    intrabarpersist VolTmp(0), 
    intrabarpersist Delta (0), 
    intrabarpersist DeltaH (0), 
    intrabarpersist DeltaL (0), 
    intrabarpersist DeltaO (0); 
    
    if LastBarOnChart then begin 
      	MyVol = Iff(BarType < 2, Ticks, Volume); 
    if CurrentBar > MyCurrentBar then begin 
    	VolumeAtBid = 0; 
    	VolumeAtAsk = 0; 
    	BAVolRatio = 0; 
    	VolTmp = 0; 
    	MyCurrentBar = CurrentBar; 
    	if ResetDeltaEachbar = 1 then Delta =0;
    	DeltaO = Delta; 
    	DeltaH = Delta; 
    	DeltaL = Delta; 
    end; 
    Block = Myvol - VolTmp;
    if (Block >= MinBlock) and (Block <= MaxBlock) then
    	if Close <= InsideBid then
    		Delta  = Delta - MyVol + VolTmp
    	else if Close >= InsideAsk then 
    		Delta = Delta + MyVol - VolTmp ;  
    	VolTmp = MyVol ;
    end; 
    
    
    DeltaH = maxlist(DeltaH, Delta); 
    DeltaL = minlist(DeltaL, Delta); 
    
    
    if Delta <= 0 then color = DownColor else color = UpColor; 
    
    plot1(DeltaO, "DO"); 
    Plot2(DeltaH, "DH"); 
    Plot3(DeltaL, "DL"); 
    plot4(Delta, "DC");	 
    
    

     

    Hello, I'm new to this forum.

    I see this code and I think that it is better to change this line:

     

    
    if Close <= InsideBid then
    		Delta  = Delta - MyVol + VolTmp
    	else if Close >= InsideAsk then 
    		Delta = Delta + MyVol - VolTmp ;  
    	VolTmp = MyVol ;
    end; 
    

     

    with this one:

     

    
    if ticks>=filtro then begin
    	if Close>= insideask then Delta=Delta+Ticks;
    	if Close<= insidebid then Delta=Delta-Ticks;
    end;
    

     

    in this way I'have the real sum of volume exchanged in bidside less the volume exchanged in askside.

    Is it correct?

     

    MARCO

×
×
  • Create New...

Important Information

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