NexusFi: Find Your Edge


Home Menu

 





Cumulative delta Multicharts


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one stefanols with 5 posts (0 thanks)
    2. looks_two ABCTG with 4 posts (1 thanks)
    3. looks_3 bomberone1 with 1 posts (0 thanks)
    4. looks_4 Alexis135 with 1 posts (0 thanks)
    1. trending_up 4,520 views
    2. thumb_up 1 thanks given
    3. group 5 followers
    1. forum 10 posts
    2. attach_file 0 attachments




 
Search this Thread

Cumulative delta Multicharts

  #1 (permalink)
 stefanols 
Helsingborg
 
Experience: Intermediate
Platform: Bullcharts, Multicharts
Trading: ES and scandinavian Stocks
Posts: 17 since May 2011
Thanks Given: 6
Thanks Received: 5

Hi,
Anyone that could help me to add volume cut off high and low for this working cumulative indicator.
I have checked other posts but this is the one that seem to work best for me (multicharts.

There is no logic to the cutoff I have just inserted it in inputs.

Thanks in advance.
BR Stefan


 
Code
Inputs:
Cut_off_low (1),
Cut_off_high (40),
	PitOpen(830),
	PitClose(1500),
	ResetAtPitOpen(False),
	ResetAtPitClose(True),
	PlotZeroLine(True),
	AlertBar(1000),
	AlertColor(Magenta),
	UpColor(Green),
	DownColor(Red);
	
Vars:
	BADelta(0),
	UpVolume(0),
	DownVolume(0),
	CumDelta(0),
	MyOpen(0),
	MyClose(0),
	BarColor(0),
	Intrabarpersist MyBarNumber(-1);
	
	If ((Time >= PitOpen And Time[1] < PitOpen And ResetAtPitOpen)
		Or (Time >= PitClose And Time[1] < PitClose And ResetAtPitClose)) then
	Begin
		CumDelta = 0;
	End;

	UpVolume = Upticks;
	DownVolume = Downticks;
	BADelta = Upticks - Downticks;
	
	// Previous bar cumulative delta is current open
	MyOpen = CumDelta;

	// Now add current bar delta to cumulative delta
	CumDelta = CumDelta + BADelta;

	// Current bar close is previous bar cumulative delta + current bar delta
	MyClose = CumDelta;
	
	If (Absvalue(BADelta) < AlertBar) then
	Begin
		If (MyOpen > MyClose) then
			BarColor = DownColor
		Else
			BarColor = UpColor;
	End
	Else
		BarColor = AlertColor;
		
	Plot1( MyOpen, "Open", BarColor ) ;
	Plot2( MyClose, "Close", BarColor ) ;
	If (PlotZeroLine) then
		Plot3( 0, "Zero");

	MyBarNumber = BarNumber[0];

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Stefan,

what are the exact rules for the cut off, can you provide an example of what you are trying to accomplish?

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #3 (permalink)
 stefanols 
Helsingborg
 
Experience: Intermediate
Platform: Bullcharts, Multicharts
Trading: ES and scandinavian Stocks
Posts: 17 since May 2011
Thanks Given: 6
Thanks Received: 5


Hi,

I am sure there are more things to think of than I have sofar.

I try to accomplish a CD that can filter tick size orders e.g. >1 and <=40 and then insert the same indi but with other settins e.g. >=41 and < 9999. This to be able to see what retail traders are doing and larger players are doing.

Hope that this gives a better picture?

Best regards

Stefan

Started this thread Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Stefan,

the "problem" is that your code simply uses the the raw values for UpTicks and DownTicks.
 
Code
	UpVolume = Upticks;
	DownVolume = Downticks;
Your filtering has to be applied before that. You basically need two additional intrabarpersist variables for the up volume and update them each tick (some of the other variables like UpVolume might need to be intrabarpersist, too).

Then you can store the current and previous code computation's UpTicks value like this:
 
Code
prevUpVolume = currentUpVolume ;
currentUpVolume = Upticks ;
With these two variables you can compute the UpTicks value for each tick that came in and check if it matches your inputs - if it does, add it to UpVolume.

At the beginning of a bar you would have to set prevUpVolume to 0 and reset UpVolume. You would have to do the same for the DownTicks, too.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #5 (permalink)
 stefanols 
Helsingborg
 
Experience: Intermediate
Platform: Bullcharts, Multicharts
Trading: ES and scandinavian Stocks
Posts: 17 since May 2011
Thanks Given: 6
Thanks Received: 5

Ok thanks, I will see if I have the skills to do that.

Best regards

Started this thread Reply With Quote
  #6 (permalink)
 stefanols 
Helsingborg
 
Experience: Intermediate
Platform: Bullcharts, Multicharts
Trading: ES and scandinavian Stocks
Posts: 17 since May 2011
Thanks Given: 6
Thanks Received: 5

Hi again,

My coding is unfortunately not that good.

If you have time to insert what is missing that would be highly appreciated.

BR Stefan

 
Code
Inputs:
	
	Cut_off_low (1),
	Cut_off_high (40),
	PitOpen(830),
	PitClose(1500),
	ResetAtPitOpen(False),
	ResetAtPitClose(True),
	PlotZeroLine(True),
	AlertBar(1000),
	AlertColor(Magenta),
	UpColor(Green),
	DownColor(Red);
	
Vars:
	prevUpVolume (0),
	currentUpVolume (0),
	prevdownVolume (0),
	currentdownVolume (0),
	BADelta(0),
	UpVolume(0),
	DownVolume(0),
	CumDelta(0),
	MyOpen(0),
	MyClose(0),
	BarColor(0),
	Intrabarpersist MyBarNumber(-1);
	
		
	
	
	If ((Time >= PitOpen And Time[1] < PitOpen And ResetAtPitOpen)
		Or (Time >= PitClose And Time[1] < PitClose And ResetAtPitClose)) then
	Begin
		CumDelta = 0;
	End;


With these two variables you can compute the UpTicks value for each tick that came in and check if it matches your inputs - if it does, add it to UpVolume.

        At the beginning of a bar you would have to set prevUpVolume to 0 and reset UpVolume. You would have to do the same for the DownTicks, too.



	prevUpVolume = currentUpVolume;
	currentUpVolume = Upticks ;
	prevdownVolume = currentdownVolume;
	currentdownVolume = downticks ;
	UpVolume = Upticks;
	DownVolume = Downticks;
	BADelta = Upticks - Downticks;
	
	// Previous bar cumulative delta is current open
	MyOpen = CumDelta;

	// Now add current bar delta to cumulative delta
	CumDelta = CumDelta + BADelta;

	// Current bar close is previous bar cumulative delta + current bar delta
	MyClose = CumDelta;
	
	If (Absvalue(BADelta) < AlertBar) then
	Begin
		If (MyOpen > MyClose) then
			BarColor = DownColor
		Else
			BarColor = UpColor;
	End
	Else
		BarColor = AlertColor;
		
	Plot1( MyOpen, "Open", BarColor ) ;
	Plot2( MyClose, "Close", BarColor ) ;
	If (PlotZeroLine) then
		Plot3( 0, "Zero");

	MyBarNumber = BarNumber[0];

Started this thread Reply With Quote
  #7 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Stefan,

I'll gladly steer you in the right direction, but if you are looking for someone to write the code for you, you might want to post in the Want your [AUTOLINK]EasyLanguage[/AUTOLINK] indicator created, free? thread.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #8 (permalink)
 stefanols 
Helsingborg
 
Experience: Intermediate
Platform: Bullcharts, Multicharts
Trading: ES and scandinavian Stocks
Posts: 17 since May 2011
Thanks Given: 6
Thanks Received: 5

Hi,

That would be much appreciated. Some ground logic that I can use and then I hope that I could
finalize it myself.

Thanks for your help.

Best regards

Stefan

Started this thread Reply With Quote
  #9 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Stefan,

everything you need to do is in here: .

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #10 (permalink)
 Alexis135 
Quebec
 
Experience: Intermediate
Platform: Daytradr
Broker: AMP / CQG
Trading: ZB
Posts: 6 since Mar 2017
Thanks Given: 3
Thanks Received: 4


Looking forward the the indicator if your willing to share it.

Follow me on Twitter Reply With Quote




Last Updated on June 9, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts