NexusFi: Find Your Edge


Home Menu

 





Essence# new open source .net programming language


Discussion in Traders Hideout

Updated
    1. trending_up 6,182 views
    2. thumb_up 5 thanks given
    3. group 2 followers
    1. forum 11 posts
    2. attach_file 0 attachments




 
Search this Thread

Essence# new open source .net programming language

  #1 (permalink)
 
jupiejupe's Avatar
 jupiejupe 
San Diego California
 
Experience: None
Platform: Home Grown IN Development
Broker: Broker InteractiveBrokers
Trading: CL
Posts: 146 since Apr 2011
Thanks Given: 87
Thanks Received: 68

Hey guys traders and programmers alike, just wanted to give you the heads up of a new open source .net programming language.

My cousin spent the last so far all of 2014 coding it up, he got tried of using C# and he wanted to have true OO language to code with for .net i.e. C#, i.e. NT. He also designed the syntax and semantics to be easy for new traders to use, i.e. me.

here is the codeplex where the language lives in it's open source life. https://essencesharp.codeplex.com

here is the github if you want to get it there instead of codeplex
https://github.com/EssenceSharp/Standard.lib

he does a much better job defining what is going on with it over there and has a blog as well to
Essence# | The Essence of OOP: It's all messages, all the time.

and lastly the google+ page for keeping up on news
https://workspaceupdates.googleblog.com/2023/04/new-community-features-for-google-chat-and-an-update-currents%20.html


so here is in his words is the info on the landing pages.



Quoting 
Story
Tagline
The essence of OOP: It's all messages, all the time.
Introduction
Essence# is comprehensively and pervasively based on the essence of dynamic, object-oriented programming: Sending messages. It's all messages, all the time.

Essence# can be used to write and run programs that run on the .Net platform.

Essence# is a fully dynamic and highly polymorphic programming language which features pervasive message passing, pervasive dynamic and strong typing, pervasive and deep reflection and pervasive object orientation.Essence# implements and reveals the "essence" of object-oriented programming:

Message passing: Almost all computation in Essence# happens via the sending of messages. The only way to invoke a method is to send a message—which necessarily involves dynamic binding (by name) of message to method at runtime (and never at compile time.) The internals of an object are not externally accessible, ever—the only way to access or modify an object's internal state is to send it a message. So function and data abstraction are both complete and universal.

Dynamic and strong typing: Although any object can be assigned to any variable, the only way to access or modify the internal state of an object is to send it a message—and the sending of any invalid message is detected and prevented at run time. So, even though Essence#'s pervasive use of dynamic typing enables the programmer to define highly polymorphic abstractions with an extremely high degree of applicability and reusability, it is impossible to apply a function to a value for which there is no valid, defined behavior.

Reflection: In most programming languages, the specifications of types, classes, functions and subroutines exist only in the source code, and so are not accessible at runtime. But in Essence#, all specifications of all program constructs (classes, methods, etc.) are live objects that exist both at compile time and at runtime—and those objects are fully accessible to a running program, and can be queried or modified by sending them messages. So an Essence# program can not only fully introspect on itself, it has full power to change itself.

Object-orientation: In Essence#, all values are objects—even booleans, integers and other numbers, characters, strings, classes, blocks of code...and even"null." That's right, in Essence# you can not only send messages to "null," you can even add methods to the class of "null," and then send "null" the corresponding messages! That's because all Essence# values are instances of a class, and so can all be sent messages. And Essence# classes can be created and modified while the program is running. In Essence#, almost all computation is done by sending messages.

Inter-language interoperability: Thanks to the DLR's Meta Object Protocol, Essence# provides deep and comprehensive integration and interoperability with other programming languages that are hosted on the CLR, whether those are statically-typed languages such as C# or are dynamically-typed languages that use the DLR's Meta Object Protocol.

In fact, Essence# serves as an excellent language for scripting the creation and manipulation of C# objects (for example.) The original motivation for the creation of Essence# was to use it as a domain specific language for creating and configuring C# objects that specify trading plans generated in response to trading signals. It has been and is being used for that purpose by the original implementer.

Necessity is the essence of invention. :-)


"Learning to Trade: The Cost Of Tuition"
- a roadmap of my lessons learned as taught by the market
Follow me on Twitter Started this thread Reply With Quote
The following 2 users say Thank You to jupiejupe for this post:

Can you help answer these questions
from other members on NexusFi?
Request for MACD with option to use different MAs for fa …
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
Battlestations: Show us your trading desks!
48 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #2 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690

In another thread you were also promoting this and said:


jupiejupe View Post
my cousin just released his own programming language you can think of it like easy language but with the full power of .net behind it.

Could you provide us with a clear code example that compares Essence# with C#, NinjaScript and EasyLanguage?

Reply With Quote
  #3 (permalink)
 
jupiejupe's Avatar
 jupiejupe 
San Diego California
 
Experience: None
Platform: Home Grown IN Development
Broker: Broker InteractiveBrokers
Trading: CL
Posts: 146 since Apr 2011
Thanks Given: 87
Thanks Received: 68


in another thread i mentioned it yes, you must have over looked the part where i mention my lack of ability to program, my cousin has provided examples of code either on the code plex of his blog which i provided links to.

"Learning to Trade: The Cost Of Tuition"
- a roadmap of my lessons learned as taught by the market
Follow me on Twitter Started this thread Reply With Quote
  #4 (permalink)
 
Jura's Avatar
 Jura   is a Vendor
 
Posts: 775 since Apr 2010
Thanks Given: 2,352
Thanks Received: 690


jupiejupe View Post
In another thread i mentioned it yes, you must have over looked the part where i mention my lack of ability to program

But you also said that this language was easy to use:

jupiejupe View Post
He also designed the syntax and semantics to be easy for new traders to use, i.e. me.

Your reference to EasyLanguage and comparing it as a better alternative to NinjaScript also suggested to me as much.

* * *


jupiejupe View Post
, my cousin has provided examples of code either on the code plex of his blog which i provided links to.

I looked in the documentation and the blog, but could not find code examples that answered my question. Could you provide a link?

Reply With Quote
  #5 (permalink)
 
jupiejupe's Avatar
 jupiejupe 
San Diego California
 
Experience: None
Platform: Home Grown IN Development
Broker: Broker InteractiveBrokers
Trading: CL
Posts: 146 since Apr 2011
Thanks Given: 87
Thanks Received: 68

Sure, just a sec let me go find it.

"Learning to Trade: The Cost Of Tuition"
- a roadmap of my lessons learned as taught by the market
Follow me on Twitter Started this thread Reply With Quote
  #6 (permalink)
 
jupiejupe's Avatar
 jupiejupe 
San Diego California
 
Experience: None
Platform: Home Grown IN Development
Broker: Broker InteractiveBrokers
Trading: CL
Posts: 146 since Apr 2011
Thanks Given: 87
Thanks Received: 68

altho, i can not provide you with code in all three languages, as i am not a programmer, and my cousin does not code easy lang. so let me see what i can find. hopefully it is both essence# and c#.

"Learning to Trade: The Cost Of Tuition"
- a roadmap of my lessons learned as taught by the market
Follow me on Twitter Started this thread Reply With Quote
  #7 (permalink)
 
jupiejupe's Avatar
 jupiejupe 
San Diego California
 
Experience: None
Platform: Home Grown IN Development
Broker: Broker InteractiveBrokers
Trading: CL
Posts: 146 since Apr 2011
Thanks Given: 87
Thanks Received: 68

I could not find any either, altho i know that i have watched him write some for examples, i'll ask him after i woke up as i have not slept yet.

here is a example for the code we are using that is likened to easy language this works with nt7 normally this info would be in the strategy dialogue, but we prefer to do it is script so we can have a record of changes made matched to results in our market research. this is not a complete entry and exit rules but it gives you an idea as to how we use essence# and what it looks like as we use.

again i'll have him right for you two pieces of code one in c# and the other essence# later today.



entryOrder := Entry
orderType: #StopLimit
price: (RelativeBestQuote tickOffset: entryOrderStopOffset)
preEntryTimeToFill: 600
timeExit: 130000
timedExitActivationRule: #ActivateBar1.

timedExit1 := TimedExit
BarsToLive: 8
FavorableBarsToLive: 0
AdverseBarsToLive: 5
autoTrailStopForgiveness: 2
autoTrailTicksBack: 1.

trailingStop1 := TrailingStop
autoTrail: autoTrail1 "autoTrailRule".

trailingStop2 := TrailingStop
autoTrail: autoTrail2 "autoTrailRule".

autoTrail1 := BarAutoTrail
barsBeforeActive: 5
ticksBeforeActive: 5
minFromLastPrice: 0
multiplierType: #ATR.

autoTrail2 := BarAutoTrail
barsBeforeActive: 16
ticksBeforeActive: 12
minFromLastPrice: 0
multiplierType: #STD.

"Learning to Trade: The Cost Of Tuition"
- a roadmap of my lessons learned as taught by the market
Follow me on Twitter Started this thread Reply With Quote
The following 2 users say Thank You to jupiejupe for this post:
  #8 (permalink)
 
jupiejupe's Avatar
 jupiejupe 
San Diego California
 
Experience: None
Platform: Home Grown IN Development
Broker: Broker InteractiveBrokers
Trading: CL
Posts: 146 since Apr 2011
Thanks Given: 87
Thanks Received: 68

As I was getting ready for bed this pop into my head, and it is the reason i stated that "essence# has the power of .net behind it."


Quoting 
You can write Essence# code that creates instances of CLR classes (C#, VisualBasic, F#, etc) by invoking class constructors. You can send messages to instances of classes written in any CLR-based language, and the expected method will be executed. You can pass an Essence# block object as an argument to C# code, which can use it as a delegate (anonymous function.) And in .Net 4.0 or later, other CLR-based languages can also send messages to Essence# objects.

In fact, Essence# uses native CLR values as its own native values in many cases: "nil" is the same value as "null," Boolean values (true, false) are one and the same, and numbers are identical. Enum values act as Symbols, and Symbols act as Enum values (under the covers, they aren't the same.) The same goes for Strings, Symbols and character arrays.

this is from a post on the g+ profile the date and name of post are below where he is talking about this.

May 27, 2014
Introducing the programming language Essence#

"Learning to Trade: The Cost Of Tuition"
- a roadmap of my lessons learned as taught by the market
Follow me on Twitter Started this thread Reply With Quote
  #9 (permalink)
 
jupiejupe's Avatar
 jupiejupe 
San Diego California
 
Experience: None
Platform: Home Grown IN Development
Broker: Broker InteractiveBrokers
Trading: CL
Posts: 146 since Apr 2011
Thanks Given: 87
Thanks Received: 68

My cousins says that he is not yet at the point of worrying about sample code, he is still working on stuff after the maiden release, and will wait until after the to worry about getting sample code out there for people that need more of a explain then he has currently provided. so i'll keep you posted

"Learning to Trade: The Cost Of Tuition"
- a roadmap of my lessons learned as taught by the market
Follow me on Twitter Started this thread Reply With Quote
The following user says Thank You to jupiejupe for this post:
  #10 (permalink)
 
jupiejupe's Avatar
 jupiejupe 
San Diego California
 
Experience: None
Platform: Home Grown IN Development
Broker: Broker InteractiveBrokers
Trading: CL
Posts: 146 since Apr 2011
Thanks Given: 87
Thanks Received: 68


Here is the Ninja Trader 7 Indicator EMA of course it is written in C#.



//
// Copyright (C) 2006, NinjaTrader LLC <www.ninjatrader.com>.
// NinjaTrader reserves the right to modify or overwrite this NinjaScript component with each release.
//

#region Using declarations
using System;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.ComponentModel;
using System.Xml.Serialization;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion

// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
/// <summary>
/// Exponential Moving Average. The Exponential Moving Average is an indicator that shows the average value of a security's price over a period of time. When calculating a moving average. The EMA applies more weight to recent prices than the SMA.
/// </summary>
[Description("The Exponential Moving Average is an indicator that shows the average value of a security's price over a period of time. When calculating a moving average. The EMA applies more weight to recent prices than the SMA.")]
public class EMA : Indicator
{
#region Variables
private int period = 14;
#endregion

/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.Orange, "EMA"));

Overlay = true;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
Value.Set(CurrentBar == 0 ? Input[0] : Input[0] * (2.0 / (1 + Period)) + (1 - (2.0 / (1 + Period))) * Value[1]);
}

#region Properties
/// <summary>
/// </summary>
[Description("Numbers of bars used for calculations")]
[GridCategory("Parameters")]
public int Period
{
get { return period; }
set { period = Math.Max(1, value); }
}
#endregion
}
}

#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
public partial class Indicator : IndicatorBase
{
private EMA[] cacheEMA = null;

private static EMA checkEMA = new EMA();

/// <summary>
/// The Exponential Moving Average is an indicator that shows the average value of a security's price over a period of time. When calculating a moving average. The EMA applies more weight to recent prices than the SMA.
/// </summary>
/// <returns></returns>
public EMA EMA(int period)
{
return EMA(Input, period);
}

/// <summary>
/// The Exponential Moving Average is an indicator that shows the average value of a security's price over a period of time. When calculating a moving average. The EMA applies more weight to recent prices than the SMA.
/// </summary>
/// <returns></returns>
public EMA EMA(Data.IDataSeries input, int period)
{
if (cacheEMA != null)
for (int idx = 0; idx < cacheEMA.Length; idx++)
if (cacheEMA[idx].Period == period && cacheEMA[idx].EqualsInput(input))
return cacheEMA[idx];

lock (checkEMA)
{
checkEMA.Period = period;
period = checkEMA.Period;

if (cacheEMA != null)
for (int idx = 0; idx < cacheEMA.Length; idx++)
if (cacheEMA[idx].Period == period && cacheEMA[idx].EqualsInput(input))
return cacheEMA[idx];

EMA indicator = new EMA();
indicator.BarsRequired = BarsRequired;
indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
indicator.Input = input;
indicator.Period = period;
Indicators.Add(indicator);
indicator.SetUp();

EMA[] tmp = new EMA[cacheEMA == null ? 1 : cacheEMA.Length + 1];
if (cacheEMA != null)
cacheEMA.CopyTo(tmp, 0);
tmp[tmp.Length - 1] = indicator;
cacheEMA = tmp;
return indicator;
}
}
}
}

"Learning to Trade: The Cost Of Tuition"
- a roadmap of my lessons learned as taught by the market
Follow me on Twitter Started this thread Reply With Quote





Last Updated on June 11, 2014


© 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