PowerLanguage & EasyLanguage How-To's - EasyLanguage Programming | futures io social day trading
futures io futures trading


PowerLanguage & EasyLanguage How-To's
Updated: Views / Replies:7,600 / 14
Created: by Gadgetman Attachments:0

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
 

PowerLanguage & EasyLanguage How-To's

  #1 (permalink)
Elite Member
Deal, Kent
 
Futures Experience: Advanced
Platform: Multicharts, Metatrader
Favorite Futures: GBP/JPY
 
Gadgetman's Avatar
 
Posts: 6 since Apr 2010
Thanks: 0 given, 3 received

PowerLanguage & EasyLanguage How-To's

Well for a start I have no idea whether there should be an apostrophe in that title or not - I'm sure any grammar police will help...

As I mentioned in my intro - I'm porting my MT4 strategies over to PowerLanguage (PL), so I can trade MCFX with FXCM. Although I used full EasyLanguage some years ago, the brain cells containing that code died not long after thanks to the necessary alcohol. So I'm learning on the fly as I'm re-writing.

I'm coding with a cut-down version of EL as well as learning so thought I would start this thread as a way of asking questions, calling out the reduced functionality or workarounds in PL and passing on tips as I learn them plus of course it will contain all the useful tips from the experts too (I hope...)

If I've missed another thread somewhere that already does that, great please point it out and I'll close this one.

First question coming in next post!

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Deal, Kent
 
Futures Experience: Advanced
Platform: Multicharts, Metatrader
Favorite Futures: GBP/JPY
 
Gadgetman's Avatar
 
Posts: 6 since Apr 2010
Thanks: 0 given, 3 received


In MT4, you can send your order including all info such as take profit, stop loss, slippage etc. all in one command. The take profit is sent as the price you are aiming for.

In EL - it seems to handle take profit differently, with settakeprofit being the actual profit amount you are aiming for, rather than price. Clever, as it obviously does the currency conversion for you, but I'm using a box breakout strategy and the tp is a % of the box range.

Any thoughts on the best approach?
I have an idea I may end up having to monitor the current profit somehow and send a sell or buytocover order when the profit is hit.

Would really appreciate some help on this...

Reply With Quote
 
  #4 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,352 given, 83,233 received

I do this in each of my strats:

 
Code
                            
inputs:

  
target1 (20);
  
stoploss (20);
vars:
  
TickSize (MinMove/PriceScale);

SetStopContract;
SetStopLoss((stoploss TickSize) * BigPointValue);
SetProfitTarget((target1 TickSize) * BigPointValue); 
Hope it helps.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 4 users say Thank You to Big Mike for this post:
 
  #5 (permalink)
Elite Member
Deal, Kent
 
Futures Experience: Advanced
Platform: Multicharts, Metatrader
Favorite Futures: GBP/JPY
 
Gadgetman's Avatar
 
Posts: 6 since Apr 2010
Thanks: 0 given, 3 received

Great stuff thanks. Couple of fields there I hadn't read up on yet. Must admit I'm taking the route of not reading the whole reference manual but trying to find solutions as I go along.

Makes complete sense now I see how you've done it. Thanks!

Reply With Quote
 
  #6 (permalink)
Elite Member
Deal, Kent
 
Futures Experience: Advanced
Platform: Multicharts, Metatrader
Favorite Futures: GBP/JPY
 
Gadgetman's Avatar
 
Posts: 6 since Apr 2010
Thanks: 0 given, 3 received

Curse the recursive!

Back from a break, raring to go and come across a problem to what should be a very simple piece of code. Tried to find a solution on the web but although problem is recognized, haven't found a solution yet.

I want to calculate the daily range myself, rather than use ATR. It should be a simple case of looking back xx days, deducting low from high for each day and adding to a total.
When all days have been read, dividethe total range for all days by the number of days. Just a few lines of code and done, surely! Ha ha I should know better!

For some reason, if you try adding to the same field within a loop you get weird results with EL.

 
Code
                            
inputsNumberOfDays (3);
variablesadr(0), counter(0), rangetotal(0);

for 
counter 1 to NumberOfDays
begin
    
//Read high and low for each day, calculate range and add to rangetotal
    
rangetotaladr + (high[counter] - low[counter]);
    print (
"Counter = "counter"  high = ",high[counter], "  low = ",low[counter], "  range = ",high[counter] - low[counter],"  rangetotal= ",rangetotal);
end;
//Divide total ranges for all days by number of days and assign to adr
adr rangetotal/NumberofDays;
print(
"adr = ",adr); 
Output from this code is:
HTML Code:
Counter =    1.00  high =  130.22  low =  127.63  range =    2.59  rangetotal= 4505.81
Counter =    2.00  high =  131.36  low =  129.11  range =    2.25  rangetotal= 4508.06
Counter =    3.00  high =  130.80  low =  127.72  range =    3.08  rangetotal= 4511.14
adr = 1503.71
As you can see the range totals are way out, the rangetotal figures should read:
HTML Code:
1:       2.592
2:       4.843 (2.592 + 2.251)
3:       7.920 (4.843 + 3.077)
Unless I'm doing something really stupid, for which I will blush profusely and kick myself, EL is messing up.

I'm sure there's a workaround or alternative way of doing this. Any help would be really appreciated!

Cheers
David


Last edited by sam028; May 26th, 2010 at 07:58 AM. Reason: add tags
Reply With Quote
 
  #7 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,352 given, 83,233 received

You can see that by adding the prior line to the current line you get the right result, so I think it's just your loop that is the problem and your doing the adr math outside the loop.

Why not just add it on top of each other, like you did in the example, something like:

 
Code
                            
rangetotalrangetotal + (high[counter] - low[counter]); 

And get rid of adr altogether.

(untested)

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #8 (permalink)
Elite Member
Deal, Kent
 
Futures Experience: Advanced
Platform: Multicharts, Metatrader
Favorite Futures: GBP/JPY
 
Gadgetman's Avatar
 
Posts: 6 since Apr 2010
Thanks: 0 given, 3 received

Still (re)cursing...

I guess it would help if I posted the correct code when I had a problem, sorry, I could have sworn I amended that post!
Mike, the actual code does already say rangetotal= rangetotal + (high[counter] - low[counter]);

And it still didn't work.
Initial, I had adr = adr + (high[counter] - low[counter]);
I wondered if using the adr field in the loop, then also using it outside the loop might have been the problem, so I introduced rangetotal within the loop. Didn't help though.

This has been driving me nuts.
But I've finally had the Eureka moment: I wasn't zeroing the adr or rangetotal fields before going back into the loop!

So this code works fine:

 
Code
                            
inputsNumberOfDays (3);
variablesadr(0), counter(0), rangetotal(0);

adr 0;
rangetotal 0;

for 
counter 1 to NumberOfDays
begin
    
//Read high and low for each day and add to rangetotal
    
rangetotal rangetotal + (high[counter]-low[counter]);
    print (
"Counter = "counter"  high = ",high[counter], "  low = ",low[counter], "  rangetotal = ",rangetotal);
end;

//Divide total ranges for all days by number of days and assign to adr
adr rangetotal/NumberofDays;
print(
"adr = ",adr); 

A basic error and pretty worthy of a good blush I think...

Thanks for the response Mike.

Reply With Quote
The following user says Thank You to Gadgetman for this post:
 
  #9 (permalink)
Elite Member
Switzerland
 
Futures Experience: Beginner
Platform: MultiCharts, TradeInterceptor
Favorite Futures: Forex
 
Posts: 13 since Mar 2011
Thanks: 0 given, 1 received

Hope this is still the place to ask questions about Easy-/PowerLanguage.

I'm looking for information on how to code indicators for the Market Scanner in MultiCharts.
I'd like something that can show the distance to the high/low on whatever resolution the instrument is set to.

Appreciate any help - Cheers!

Reply With Quote
 
  #10 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,352 given, 83,233 received



ccfeldt View Post
Hope this is still the place to ask questions about Easy-/PowerLanguage.

I'm looking for information on how to code indicators for the Market Scanner in MultiCharts.
I'd like something that can show the distance to the high/low on whatever resolution the instrument is set to.

Appreciate any help - Cheers!

I've never tried to do that. You may want to private message @MultiCharts just to confirm its possible and have them point you towards documentation.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote

Reply



futures io > > > > > PowerLanguage & EasyLanguage How-To's

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
Powerlanguage and Multi time frames Laurent EasyLanguage Programming 10 December 2nd, 2016 03:54 AM
How to round up / down >> Multichart - PowerLanguage arjfca The Elite Circle 4 August 13th, 2013 03:25 AM
Order Flow & The Balance of Trade - Then & Now T1P1 Traders Hideout 11 May 24th, 2011 09:33 PM
What is the BestQuantity for Targets 1&2&3 = ?? Trader.Jon NinjaTrader Programming 5 October 26th, 2010 02:32 PM
Easylanguage vs. C++ Cogito ergo sum EasyLanguage Programming 10 August 2nd, 2010 03:12 PM


All times are GMT -4. The time now is 05:05 PM.

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-14 in 0.14 seconds with 19 queries on phoenix via your IP 54.221.73.186