Total, Highest, Lowest Delta - MultiCharts | futures io social day trading
futures io futures trading


Total, Highest, Lowest Delta
Updated: Views / Replies:758 / 0
Created: by arnie Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Total, Highest, Lowest Delta

  #1 (permalink)
in a meditative state...
Portugal
 
Futures Experience: Advanced
Platform: Multicharts, Jigsaw
Broker/Data: Stage5, OEC
Favorite Futures: Treasuries
 
arnie's Avatar
 
Posts: 801 since May 2010
Thanks: 709 given, 976 received

Total, Highest, Lowest Delta

Based on what SP made on his NumbersBars study I wrote this one to accomplish my needs.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



 
Code
// Fernando
// 10-02-2013
// Plot the total, the highest and lowest delta
   {- Add Cumulative Delta as 2nd data series with the same resolution as the main data series 
      and base this study on that 2nd data series. Also set it to - Break on Session}

inputs:
   FontType            ("Lucida Sans Typewriter"),
   ShowLabels            (false), // labels each delta calculation
   LabelTextSize            (8),
   LabelColor            (darkgray),
   ShowDeltaHistory         (false), // plots delta calculations prior to today
   ShowHiLoVariation         (true), // plots percentage calculation of total delta against highest and lowest delta
   TextColor            (white),
   DeltaTextSize            (13),
   HiLoTextSize            (10),
   PlusDeltaColor         (blue),
   MinusDeltaColor         (red),
   DeltaLocation            (1.4), // text location on the subchart 
   VariLocation            (0.9), // text location on the subchart 
   HiDeltaLocation         (0.5), // text location on the subchart 
   LoDeltaLocation         (0); // text location on the subchart 

variables:
   myDelta            (0),
   myHighDelta            (0),
   myLowDelta            (0),
   hiDeltaVari            (0),
   loDeltaVari            (0),
   deltaTXT            (-1),
   highTXT            (-1),
   lowTXT               (-1),
   variTXT            (-1),
   myDeltaTXT            (-1),
   myHighTXT            (-1),
   myLowTXT            (-1),
   deltaVariTXT            (-1);

if currentbar =  1 then begin
   // Label text
   if ShowLabels = true then begin
      deltaTXT= text_new_self_s(date, time_s, DeltaLocation, "");
         text_setfontname(deltaTXT, FontType);
         text_setsize(deltaTXT, LabelTextSize);
         text_setstyle(deltaTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(deltaTXT, LabelColor);

      highTXT= text_new_self_s(date, time_s, HiDeltaLocation, "");
         text_setfontname(highTXT, FontType);
         text_setsize(highTXT, LabelTextSize);
         text_setstyle(highTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(highTXT, LabelColor);

      lowTXT= text_new_self_s(date, time_s, LoDeltaLocation, "");
         text_setfontname(lowTXT, FontType);
         text_setsize(lowTXT, LabelTextSize);
         text_setstyle(lowTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
         text_setcolor(lowTXT, LabelColor);
      
      if ShowHiLoVariation = true then begin
         variTXT= text_new_self_s(date, time_s, VariLocation, "");
            text_setfontname(variTXT, FontType);
            text_setsize(variTXT, LabelTextSize);
            text_setstyle(variTXT, 0, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
            text_setcolor(variTXT, LabelColor);
            //text_setbgcolor(variTXT, black);
      end;
   end;
end;
   
if date <> date[1] then begin
   // Delta prices
   myDelta = close;
   myHighDelta = high;
   myLowDelta = low;
end
else begin
   // Delta prices
   myDelta = close - close[1];   
   myHighDelta = high - close[1];
   myLowDelta = low -  close[1];
end;

// Highest delta variation
if myHighDelta <> 0 then
   hiDeltaVari = ((myDelta / myHighDelta) - 1) * 100;
// Lowest delta variation
if myLowDelta <> 0 then 
   loDeltaVari = ((myDelta / myLowDelta) - 1) * 100;

// Total, highest and lowest delta text
if ShowDeltaHistory = true or (ShowDeltaHistory = false and date = LastCalcDate) then begin
   myDeltaTXT = text_new_self_s(date, time_s, DeltaLocation, "");
      text_setfontname(myDeltaTXT, FontType);
      text_setsize(myDeltaTXT, 13);
      text_setstyle(myDeltaTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myDeltaTXT, TextColor);

   myHighTXT= text_new_self_s(date, time_s, HiDeltaLocation, "");
      text_setfontname(myHighTXT, FontType);
      text_setsize(myHighTXT, 10);
      text_setstyle(myHighTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myHighTXT, TextColor);
      
   myLowTXT= text_new_self_s(date, time_s, LoDeltaLocation, "");
      text_setfontname(myLowTXT, FontType);
      text_setsize(myLowTXT, 10);
      text_setstyle(myLowTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
      text_setcolor(myLowTXT, TextColor);

      if ShowHiLoVariation = true then begin
         deltaVariTXT= text_new_self_s(date, time_s, VariLocation, "");
            text_setfontname(deltaVariTXT, FontType);
            text_setsize(deltaVariTXT, HiLoTextSize);
            text_setstyle(deltaVariTXT, 2, 0); // Hrz = 0=right 1=left 2=centered Vrt = 0=below 1=above 2=centered
            text_setcolor(deltaVariTXT, TextColor);
      end;
end;

// set highest and lowest delta string variation
if myDelta > 0 then
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(hiDeltaVari, 0))) +} numtostr(hiDeltaVari, 0) + "%")
else
   text_setstring(deltaVariTXT, {spaces(5 - strlen(numtostr(loDeltaVari, 0))) +} numtostr(absValue(loDeltaVari), 0) + "%");

// set delta string
text_setstring(myDeltaTXT, {spaces(5 - strlen(numtostr(myDelta, 0))) +} numtostr(myDelta, 0));

// set delta string background color
   if myDelta > 0 then
      text_setbgcolor(myDeltaTXT, PlusDeltaColor)
   else
      text_setbgcolor(myDeltaTXT, MinusDeltaColor); 

// set highest delta string and background color
if myHighDelta > 0 then                                               
   text_setstring(myHighTXT, spaces(8 - strlen(numtostr(myHighDelta, 0))) + numtostr(myHighDelta, 0))
else
   text_setstring(myHighTXT, spaces(8 - strlen(numtostr(myHighDelta, 0))) + "0");
   text_setbgcolor(myHighTXT, PlusDeltaColor);

// set lowest delta string and background color   
if myLowDelta < 0 then   
   text_setstring(myLowTXT, spaces(8 - strlen(numtostr(myLowDelta, 0))) + numtostr(myLowDelta, 0))
else
   text_setstring(myLowTXT, spaces(8 - strlen(numtostr(myLowDelta, 0))) + "0");
   text_setbgcolor(myLowTXT, MinusDeltaColor);

// set labels string and location
text_setlocation_s(deltaTXT, date, time_s, DeltaLocation);
text_setstring(deltaTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Total Delta");

text_setlocation_s(variTXT, date, time_s, VariLocation);
text_setstring(variTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Total Delta %");

text_setlocation_s(highTXT, date, time_s, HiDeltaLocation);
text_setstring(highTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Highest Delta");

text_setlocation_s(lowTXT, date, time_s, LoDeltaLocation);
text_setstring(lowTXT, spaces(12 - strlen(numtostr(myHighDelta, 0))) + "Lowest Delta");

If I become half a percent smarter each year, I'll be a genius by the time I die
Reply With Quote
The following user says Thank You to arnie for this post:

Reply



futures io > > > > Total, Highest, Lowest Delta

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Efficient Code for finding highest high and lowest lows of a range of bars. xigreek NinjaTrader Programming 18 July 31st, 2015 03:54 PM
"Extremes", "highest/lowest" functions affecting maxbarback LastSyndrome Elite EasyLanguage Automated Trading 3 September 1st, 2012 06:38 AM
Retrieving delta for a bar calling Gom Delta functions josh The Elite Circle 5 May 2nd, 2012 03:35 PM
Highest or lowest swings luitom NinjaTrader Programming 4 January 27th, 2012 06:07 PM
RJay's Total and Delta Volume Splitter Suites RJay The Elite Circle 61 September 12th, 2011 06:36 AM


All times are GMT -4. The time now is 12:40 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.07 seconds with 20 queries on phoenix via your IP 54.221.93.187