Notepad++ and EasyLanguage - futures io
futures io futures trading



Notepad++ and EasyLanguage


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one vmodus with 10 posts (26 thanks)
    2. looks_two sgjohnson with 4 posts (3 thanks)
    3. looks_3 rc76 with 4 posts (2 thanks)
    4. looks_4 LastDino with 3 posts (2 thanks)
      Best Posters
    1. looks_one vmodus with 2.6 thanks per post
    2. looks_two syswizard with 1 thanks per post
    3. looks_3 sgjohnson with 0.8 thanks per post
    4. looks_4 rc76 with 0.5 thanks per post
    1. trending_up 2,998 views
    2. thumb_up 35 thanks given
    3. group 7 followers
    1. forum 23 posts
    2. attach_file 3 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Notepad++ and EasyLanguage

(login for full post details)
  #1 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received

I would like to share something with the community that my team came up with a couple of years ago and that I've been using a lot over the past month as I develop strategies and studies in EasyLanguage. I use Notepad++ in my daily life outside of trading for developing a ton of code in a number of different languages.

I often like to code outside the TradeStation Development Environment, for a number of reasons. The main reason is that I suffered a major crash of TradeStation and lost half day's work. I have a couple of version control mechanisms in place that constantly save my file changes in Notepad++, so I never lose my work.

How to install:
  1. Download the XML file attached to this forum post: EasyLanguage.xml
  2. Open Notepad++
  3. From the menu, click: Language > Define your language...
  4. You will see the User Defined Language dialog box
  5. Click Import
  6. Locate the XML file you downloaded in Step 1
  7. Click Open
  8. You should see: Import successful.
How to use:
  • In the User Defined Language dialog box, I have defined the file extension esl for EasyLanguage. This means every time I open or save a file with that extension, the context highlighting will be applied. You can change this to whatever file extension you may prefer.
  • To apply the language immediately to an unsaved document,
  • From the menu, click: Language > EasyLanguage. It's that easy!
This is what it looks like in Notepad++:


How to modify:
  1. From the menu, click: Language > Define your language...
  2. Select EasyLanguage, as shown here:
  3. Change the stylers as you like: font, colors, etc. (you're on your own there)
  4. Add your own custom function names to the styler lists, if desired/needed
  5. Changes are saved automatically. I like to keep a backup, so I always export my language definition for safekeeping.
Please note, you cannot modify ELD files in Notepad++, as they are binary. I mean, you could modify them, but not usefully.

Known issue:
  • The keyword arrays does not seem to appear in color as it should.
I do not use MultiCharts, so I cannot say how good this is with the EasyLanguage code you folks use. I only use TradeStation. Your mileage my vary.

I hope you find this useful. Please let me know if you find any issues with it, or feel free to upload and share your modifications.

~vmodus

Attached Files
Register to download File Type: xml EasyLanguage.xml (44.4 KB, 232 views)
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
MACD line not plotting after change of plot order
NinjaTrader
What blockvolume is visible? - order processing
NinjaTrader
Anyone have access to older, intraday data for stocks(AXP)?
Stocks and ETFs
Reading A set of Trading Signals
EasyLanguage Programming
OFA (Order Flow Analytics) Licence
NinjaTrader
 
 
(login for full post details)
  #3 (permalink)
Taipei
 
Experience: Beginner
Platform: NT
Broker: IB
Trading: ES
 
Posts: 6 since Jul 2018
Thanks: 1 given, 2 received


Hi vmodus,

This is awesome, thank you so much for the great share.

If possible I have a little feature request. Since the usual TS IDE as well as NPP usually defaulted to white background for development, it will be great that if we can make the IDE into dark mode (or dark color background, better for the eyes).

Is there any chance we can do a slight mod to the XML so that the it will work with dark background? (or by any chance you also use sublime text and may have EasyLanguage addon for Sublime?)

Cheers!
rc76

Attached Thumbnails
Click image for larger version

Name:	01.png
Views:	70
Size:	187.8 KB
ID:	306460  
Reply With Quote
The following user says Thank You to rc76 for this post:
 
(login for full post details)
  #4 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received


rc76 View Post
Hi vmodus,

This is awesome, thank you so much for the great share.

If possible I have a little feature request. Since the usual TS IDE as well as NPP usually defaulted to white background for development, it will be great that if we can make the IDE into dark mode (or dark color background, better for the eyes).

Is there any chance we can do a slight mod to the XML so that the it will work with dark background? (or by any chance you also use sublime text and may have EasyLanguage addon for Sublime?)

Cheers!
rc76

I'm glad this is useful for you. Hmmmmm...... dark background. Maybe you can check out these themes: https://cyberspacehawk.com/notepaddark-theme/ I have not used a theme before, so I don't know how the language will look. By coincidence, I just switched my PC over to dark theme a few days ago, so this is a very timely question.

I'm kind of old school..... my first computer black screen with amber characters and just block graphics, so I like the dark theme.

Personally, I'm not happy with my comment font, but I've been too lazy to fiddle with it.

I don't use sublime, but maybe we'll give a swing when I have some free time. I will let you know what I come up with for the Notepad++.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
Taipei
 
Experience: Beginner
Platform: NT
Broker: IB
Trading: ES
 
Posts: 6 since Jul 2018
Thanks: 1 given, 2 received

Thank you vmodus! Very looking forward!

I will post look things around see if can find anything.

Cheers!
rc76

Reply With Quote
 
(login for full post details)
  #6 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received


rc76 View Post
Thank you vmodus! Very looking forward!

I will post look things around see if can find anything.

Cheers!
rc76

FYI....I just remembered there was a thread on the TradeStation community forums where someone did something similar. You might want to search "Notepad++" over there.


Edit:
I happened to be over there, so here is the link:
https://community.tradestation.com/Discussions/Topic.aspx?Topic_ID=134952

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following 2 users say Thank You to vmodus for this post:
 
(login for full post details)
  #7 (permalink)
Legendary Pratik_4Clover
Mumbai, India
 
Experience: Beginner
Platform: TradingView & ZerodhaKite
Trading: Crude, NIFTY, BANKNIFTY
 
LastDino's Avatar
 
Posts: 862 since Jan 2019
Thanks: 2,630 given, 2,402 received

I didn't knew one could add languages to Notepad++, generally I just use Notepad on my system to do modifications and editing too, it works much better than default Pine editing window, so I'm curious if Pine could be added to the Notepad ++ too.

This is good idea, thank you

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to LastDino for this post:
 
(login for full post details)
  #8 (permalink)
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ
 
syswizard's Avatar
 
Posts: 86 since Jan 2019
Thanks: 9 given, 61 received

Nice work and thanks for this.

Do you know if this will help with the automatic formatting of the Easy Language code ?
Wow, that would be terrific feature.

Reply With Quote
The following user says Thank You to syswizard for this post:
 
(login for full post details)
  #9 (permalink)
Taipei
 
Experience: Beginner
Platform: NT
Broker: IB
Trading: ES
 
Posts: 6 since Jul 2018
Thanks: 1 given, 2 received

Much thanks vmodus!

Yes actually I have tried to PM plankConst on Tradestation forum, however didn't get a reply and it seems he hasn't post on TS forum since 2018?

He did show a dark background version of EL syntax for NP++, but I cannot find the xml for such syntax anyway on the forum.

Reply With Quote
The following user says Thank You to rc76 for this post:
 
(login for full post details)
  #10 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received



LastDino View Post
I didn't knew one could add languages to Notepad++, generally I just use Notepad on my system to do modifications and editing too, it works much better than default Pine editing window, so I'm curious if Pine could be added to the Notepad ++ too.

This is good idea, thank you

You can pretty much design any language. I did it for an obscure language I use for Oracle EBS, so I figured EL would be great, too.

For EasyLanguage, I had my assistant modify the SQL language. I gave her a list of the known functions and this is what she came up with.

If you have a list of functions, reserved words, etc. you can always Pine (or pretty much any other language) a try.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to vmodus for this post:
 
(login for full post details)
  #11 (permalink)
Legendary Pratik_4Clover
Mumbai, India
 
Experience: Beginner
Platform: TradingView & ZerodhaKite
Trading: Crude, NIFTY, BANKNIFTY
 
LastDino's Avatar
 
Posts: 862 since Jan 2019
Thanks: 2,630 given, 2,402 received


vmodus View Post
You can pretty much design any language. I did it for an obscure language I use for Oracle EBS, so I figured EL would be great, too.

For EasyLanguage, I had my assistant modify the SQL language. I gave her a list of the known functions and this is what she came up with.

If you have a list of functions, reserved words, etc. you can always Pine (or pretty much any other language) a try.

Thank you for that, I do indeed have list as Pine has documentations available, so its just matter of copy pasting from functions area. I don't think I can do SQL thing though, will look up tutorials online on this. Thanks a lot

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #12 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received


syswizard View Post
Nice work and thanks for this.

Do you know if this will help with the automatic formatting of the Easy Language code ?
Wow, that would be terrific feature.

Do you mean outlining? Toolbox I don't use outlining, but it is useful. Right now, I think only the commenting collapses. Maybe I can integrate this into future versions of this language.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #13 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received


LastDino View Post
Thank you for that, I do indeed have list as Pine has documentations available, so its just matter of copy pasting from functions area. I don't think I can do SQL thing though, will look up tutorials online on this. Thanks a lot

You're welcome. You can always import the EasyLanguage xml into Notepad++, save it with a new name, then replace the EasyLanguage keywords with the Pine keywords. Fiddle with the Comments and Operators/Delimiters and you will be on your way.

You can have different styles for different types of keywords, as shown here:



You can also associate file extensions, so I use .esl since it isn't used for anything else on my PC.

I hope this helps!

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to vmodus for this post:
 
(login for full post details)
  #14 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received


rc76 View Post
Much thanks vmodus!

Yes actually I have tried to PM plankConst on Tradestation forum, however didn't get a reply and it seems he hasn't post on TS forum since 2018?

He did show a dark background version of EL syntax for NP++, but I cannot find the xml for such syntax anyway on the forum.

Thanks for the feedback. I think I would need to add this to a theme, or maybe I could just hack the XML file. I was looking at the Dracula theme and I think it would not be too difficult. I may do it once my list of projects is whittled down to something manageable.

I will post updates on this thread. Just don't hold your breath....it may be a while.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #15 (permalink)
Legendary Pratik_4Clover
Mumbai, India
 
Experience: Beginner
Platform: TradingView & ZerodhaKite
Trading: Crude, NIFTY, BANKNIFTY
 
LastDino's Avatar
 
Posts: 862 since Jan 2019
Thanks: 2,630 given, 2,402 received


vmodus View Post
You're welcome. You can always import the EasyLanguage xml into Notepad++, save it with a new name, then replace the EasyLanguage keywords with the Pine keywords. Fiddle with the Comments and Operators/Delimiters and you will be on your way.

You can have different styles for different types of keywords, as shown here:



You can also associate file extensions, so I use .esl since it isn't used for anything else on my PC.

I hope this helps!

It will, thanks again

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to LastDino for this post:
 
(login for full post details)
  #16 (permalink)
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ
 
syswizard's Avatar
 
Posts: 86 since Jan 2019
Thanks: 9 given, 61 received


vmodus View Post
Do you mean outlining?

No, I meant formatting as in smart indenting of if-then-else, Begin/End statements, etc.

Reply With Quote
The following user says Thank You to syswizard for this post:
 
(login for full post details)
  #17 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received


syswizard View Post
No, I meant formatting as in smart indenting of if-then-else, Begin/End statements, etc.

Yeah, not sure about that, but I'll look into it when I try to do a dark theme. I know there is 'auto-indent' as an option in Preferences, but language or keyword specific....not sure about.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #18 (permalink)
Taipei
 
Experience: Beginner
Platform: NT
Broker: IB
Trading: ES
 
Posts: 6 since Jul 2018
Thanks: 1 given, 2 received


vmodus View Post
Thanks for the feedback. I think I would need to add this to a theme, or maybe I could just hack the XML file. I was looking at the Dracula theme and I think it would not be too difficult. I may do it once my list of projects is whittled down to something manageable.

I will post updates on this thread. Just don't hold your breath....it may be a while.

That do be super awesome! Thank you vmodus!

Reply With Quote
 
(login for full post details)
  #19 (permalink)
Kingsport, Tennessee
 
 
Posts: 28 since Apr 2020
Thanks: 10 given, 10 received

Just FYI, if you get the following error when applying the language:
An exception occurred due to plugin: DSpellCheck.dll
Exception reason: vector<T> too long

...just update the DSpellCheck.dll plugin via Plugins menu --> Plugin admin...

Apparently, plugins don't get updated along with the main program. I removed the Language, readded, then applied, and didn't receive the error.

Source: https://community.notepad-plus-plus.org/topic/17212/an-exception-occured-due-to-plugin-dspellcheck-dll

Reply With Quote
 
(login for full post details)
  #20 (permalink)
Kingsport, Tennessee
 
 
Posts: 28 since Apr 2020
Thanks: 10 given, 10 received

Hm. It seems NPP doesn't do EasyLanguage multi-line comments correctly if you're commenting out anything with brackets already in them.

Reply With Quote
The following user says Thank You to sgjohnson for this post:
 
(login for full post details)
  #21 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received


sgjohnson View Post
Hm. It seems NPP doesn't do EasyLanguage multi-line comments correctly if you're commenting out anything with brackets already in them.

I will take a look at this. I'm working on the dark theme in the next few weeks, so maybe I will look at this at the same time. Can you point me in the right direction with a language in NPP that does multi-line comments as you described?

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
 
(login for full post details)
  #22 (permalink)
Kingsport, Tennessee
 
 
Posts: 28 since Apr 2020
Thanks: 10 given, 10 received


vmodus View Post
I will take a look at this. I'm working on the dark theme in the next few weeks, so maybe I will look at this at the same time. Can you point me in the right direction with a language in NPP that does multi-line comments as you described?

I don't think the particular language is the issue. It's just an issue with NPP. If you create a completely new language and use an open bracket as the opening of the block comment and the close bracket as the closing of the block comment, it still does the same thing. Take this block for example:
 
Code
{ trend:=	if (barstate.isfirst) {
			1
		} else {
			if (close>nz(resistance[1])) {
				1
			} else {
				if (close<nz(support[1])) {
					-1
				} else {
					nz(trend[1])
				}
			}
		}


if first bar, trend equals 1, or if close is greater than resistance of last bar, equals 1,
or if close is less than support of last bar, equals -1, otherwise trend of last bar }
This was a nested ternary operation from a PineScript indicator I converted to if-else to help me understand it so I could convert to EasyLanguage. I just copied and pasted into the code I already had to make it convenient to look at. If you copy and paste into TDE, it's commented out, but not in NPP. Not completely anyway. Some is, some isn't. It's not a huge deal. I can always use line comments since it's not terribly difficult to read.

Reply With Quote
The following 2 users say Thank You to sgjohnson for this post:
 
(login for full post details)
  #23 (permalink)
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: TradeStation, MultiCharts
Broker: TS Securities, OANDA
Trading: Energies
 
vmodus's Avatar
 
Posts: 1,006 since Feb 2017
Thanks: 2,152 given, 2,058 received


sgjohnson View Post
I don't think the particular language is the issue. It's just an issue with NPP. If you create a completely new language and use an open bracket as the opening of the block comment and the close bracket as the closing of the block comment, it still does the same thing. Take this block for example:

This was a nested ternary operation from a PineScript indicator I converted to if-else to help me understand it so I could convert to EasyLanguage. I just copied and pasted into the code I already had to make it convenient to look at. If you copy and paste into TDE, it's commented out, but not in NPP. Not completely anyway. Some is, some isn't. It's not a huge deal. I can always use line comments since it's not terribly difficult to read.

Thanks. I'm wondering if those characters can be escaped somehow, if you know what I mean. I'm not sure how flexible the language editor is, but I will take a look at it anyhow.

I'll post any updates on this thread.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Started this thread Reply With Quote
The following user says Thank You to vmodus for this post:
 
(login for full post details)
  #24 (permalink)
Kingsport, Tennessee
 
 
Posts: 28 since Apr 2020
Thanks: 10 given, 10 received

Actually, line comments don't seem to work either. NPP sees a close bracket as ending the comment regardless if it's preceded by a line comment on the same line. Weird.

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Notepad++ and EasyLanguage


Last Updated on January 7, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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