Powerlanguage and Multi time frames - EasyLanguage Programming | futures io social day trading
futures io futures trading


Powerlanguage and Multi time frames
Updated: Views / Replies:5,120 / 10
Created: by Laurent 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 and Multi time frames

  #1 (permalink)
Elite Member
France
 
Futures Experience: Advanced
Platform: MC, MetaTrader
Favorite Futures: Stocks, Turbos, FX
 
Laurent's Avatar
 
Posts: 36 since Nov 2010
Thanks: 13 given, 8 received

Powerlanguage and Multi time frames

Hello!

I wanted to know if it is possible to use multi time frames in a function / indicator on MultiCharts / TradeStation.

Let's take an example. I want to create an indicator which will buy when the daily, the weekly and the monthly RSI are oversold.

Is it possible to do that? How? Is there some documentation/tutorial about it?

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)
 Vendor: www.systemtradersuccess.com 
Gurnee, IL
 
Futures Experience: Advanced
Platform: TradeStation
Broker/Data: TradeStation
Favorite Futures: Futures
 
Posts: 46 since Apr 2010
Thanks: 17 given, 92 received



Laurent View Post
Hello!

I wanted to know if it is possible to use multi time frames in a function / indicator on MultiCharts / TradeStation.

Let's take an example. I want to create an indicator which will buy when the daily, the weekly and the monthly RSI are oversold.

Is it possible to do that? How? Is there some documentation/tutorial about it?

You simply load a chart with with the same symbol three times. Place each symbol on it's own subchart and timeframe. Place the daily as the primary chart to trade from. Place the weekly on subchart 2 and the monthly on subchart 3. You can then access all timeframes within a function (RSIalert) as demonstrated below.

 
Code
Variables:
  ReturnValue(false),
  RSIDaily(0),
  RSIWeekly(0, data2),
  RSIMontly(0, data3);


RSIDaily = RSI( Close, 14 );
RSIWeekly = RSI( Close of Data2, 14 );
RSIMontly = RSI( Close of Data3, 14 );

If ( RSIDaily < 30 )And ( RSIWeekly < 30 ) And ( RSIMontly < 30 ) Then
   ReturnValue =  TRUE
Else ReturnValue =  FALSE;

RSIalert = ReturnValue;

Reply With Quote
The following 5 users say Thank You to Jeff65 for this post:
 
  #4 (permalink)
Trading Apprentice
Onsala Sweden
 
Futures Experience: Intermediate
Platform: Multichart
Broker/Data: InteractiveBrokers, eSignal
Favorite Futures: OMXS30
 
Posts: 28 since Nov 2016
Thanks: 21 given, 1 received


Jeff65 View Post
You simply load a chart with with the same symbol three times. Place each symbol on it's own subchart and timeframe. Place the daily as the primary chart to trade from. Place the weekly on subchart 2 and the monthly on subchart 3. You can then access all timeframes within a function (RSIalert) as demonstrated below.

 
Code
Variables:
  ReturnValue(false),
  RSIDaily(0),
  RSIWeekly(0, data2),
  RSIMontly(0, data3);


RSIDaily = RSI( Close, 14 );
RSIWeekly = RSI( Close of Data2, 14 );
RSIMontly = RSI( Close of Data3, 14 );

If ( RSIDaily < 30 )And ( RSIWeekly < 30 ) And ( RSIMontly < 30 ) Then
   ReturnValue =  TRUE
Else ReturnValue =  FALSE;

RSIalert = ReturnValue;

Hi and thanks for this example.

I have a similar problem and have tried similar solution as yours but get wrong result and can not get why?
Here is my problem:
I have written a function called "Rico.F" that is true if Close<Range*0,1 and are lowest low then 5 last period.
Then I want to buy when yesterday (daily chart), AND first hour at next day (1-hour chart), AND frist 15-min after that first hour (15- min chart) all have Rico=true.
I have 15-min as data1, 1-H as data 2 and daily as data3.
As I can see, just the 15-min Rico is correct and I cannot figur out how the code can get true result for those other in my result.
Is this some issue that you recognize?
Thanks for any clue in advance



Var:
Rico(False),
RicoD(False, data3), //ricoplus igar
RicoH(False, data2), //ricoplus 1 timme
RicoM(False), //ricoplus 15 min




//Rico
Rico = False;
RicoD=Rico.F(3)[1];
RicoH=Rico.F(2)[1];
RicoM=Rico.F(1)[1];
If RicoD and RicoH and RicoM then Rico=True;
End;

//Buy
if Ricop and marketposition = 0 then buy this bar at Close;


And Function Rico.F ***************************************************''


Inputs:
DataSerie(Numeric);

Var:
Rikoschett(0),
Lowest6Day(False),
BarRange(False);


//Lowest Low 6 dagar
If Low of data(DataSerie)<Lowest(Low of data(DataSerie),5)[1] then Lowest6Day = True;

//Rikoschett
Rikoschett=0;
If Close<((Range of data(DataSerie)*0.1) + Low of data(DataSerie)) then Rikoschett=1;

//Signal
Rico.F = False;
if Rikoschett=1 and Lowest6Day then Rico.F = True;

Reply With Quote
 
  #5 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,524 since Apr 2013
Thanks: 229 given, 852 received
Forum Reputation: Legendary

ShahramTor,

I would start with tying the functions to the datastreams when you call them. If you don't do that, they will be computed on data1 (although they use some values of your other datastreams).
You should be able to find examples for that here in the forum or in the help files (the last lines of this article show how to do it for example: FundValue (Function)).

The next step would be to add print statements to your code, so you can find out what values it uses and where it goes wrong.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #6 (permalink)
Trading Apprentice
Onsala Sweden
 
Futures Experience: Intermediate
Platform: Multichart
Broker/Data: InteractiveBrokers, eSignal
Favorite Futures: OMXS30
 
Posts: 28 since Nov 2016
Thanks: 21 given, 1 received


ABCTG View Post
ShahramTor,

I would start with tying the functions to the datastreams when you call them. If you don't do that, they will be computed on data1 (although they use some values of your other datastreams).
You should be able to find examples for that here in the forum or in the help files (the last lines of this article show how to do it for example: FundValue (Function)[/url]).

The next step would be to add print statements to your code, so you can find out what values it uses and where it goes wrong.

Regards,

ABCTG

Thans for your replay,

As you mention, I have a parameter in my function "DataSerie" which is the number of data stream.
I pass the numbers 1 to 3 for data1 to data3.

Do you see any thing wrong in that code or do you mean that it is not the correct way to make the function using different data stream?

Best regards

Reply With Quote
 
  #7 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,524 since Apr 2013
Thanks: 229 given, 852 received
Forum Reputation: Legendary

Please refer to the link I posted above and you will see how to tie the function to the datastream (which is not what you do with your code - it's missing that). Not tying the function to a specific datastream will result
in the function being executed in alignment with data1. This means that accessing a function value of [1] would give you the value the function had on the previous data1 bar and not on the previous data2 or data3 bar as you might expect. If you are fine with that, then no changes would be needed. In that case I'd still suggest to add the print statements (or to plot the function values), so you can track down what is going on more easily.

Regards,

ABCTG


ShahramTor View Post
Thans for your replay,

As you mention, I have a parameter in my function "DataSerie" which is the number of data stream.
I pass the numbers 1 to 3 for data1 to data3.

Do you see any thing wrong in that code or do you mean that it is not the correct way to make the function using different data stream?

Best regards



Last edited by ABCTG; November 29th, 2016 at 06:06 AM. Reason: Added clarification
Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #8 (permalink)
Trading Apprentice
Onsala Sweden
 
Futures Experience: Intermediate
Platform: Multichart
Broker/Data: InteractiveBrokers, eSignal
Favorite Futures: OMXS30
 
Posts: 28 since Nov 2016
Thanks: 21 given, 1 received


ABCTG View Post
Please refer to the link I posted above and you will see how to tie the function to the datastream (which is not what you do with your code - it's missing that). Not tying the function to a specific datastream will result
in the function being executed in alignment with data1. This means that accessing a function value of [1] would give you the value the function had on the previous data1 bar and not on the previous data2 or data3 bar as you might expect. If you are fine with that, then no changes would be needed. In that case I'd still suggest to add the print statements (or to plot the function values), so you can track down what is going on more easily.

Regards,

ABCTG


Yes you are right!

I get information about data1 instead of data2 and data3.
I will try to test the function "FundValue(FundFieldName,PeriodsAgo,oErrorCode)" as you mentioned.
I need to read the Low, High and the Close of datastrams but do not find any "FundFieldName" associated to them (yet).
Sorry that I am such a beginner regarding EL, but I get error while compiling my code with "FundValue"!

------ Compiled with error(s): ------
Unknown Function

Does this work in MultiChart?

Thank you so much for your support!


Last edited by ShahramTor; November 29th, 2016 at 04:33 PM.
Reply With Quote
 
  #9 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,524 since Apr 2013
Thanks: 229 given, 852 received
Forum Reputation: Legendary

ShahramTor,

the link was just supposed to be an example of how to tie a function to a datastream (more specifically the last example in the link shows you how to do it). I didn't mean that you should use the FundValue function, as it will not give you what you are looking for.

By the way you can show your appreciation for posts on futures.io by clicking the "Thanks" button next to a post.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #10 (permalink)
Trading Apprentice
Onsala Sweden
 
Futures Experience: Intermediate
Platform: Multichart
Broker/Data: InteractiveBrokers, eSignal
Favorite Futures: OMXS30
 
Posts: 28 since Nov 2016
Thanks: 21 given, 1 received


Hi,

I am afraid that I can not figure out how to tie the function to different data-stream.
Would you pls give me some examples?

Best regards

Reply With Quote

Reply



futures io > > > > > Powerlanguage and Multi time frames

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Time Frames jkinneberg NinjaTrader Programming 17 March 21st, 2015 08:42 PM
Time frames and charts spikoloco Traders Hideout 10 February 22nd, 2012 08:49 PM
Big time frames with small account Morainer Psychology and Money Management 10 June 24th, 2011 04:16 PM
Multi Time Frames - Ninja Trader jdumanic NinjaTrader 9 June 17th, 2011 11:02 AM
Multi time frames in one chart emini_Holy_Grail NinjaTrader 1 December 16th, 2009 08:09 AM


All times are GMT -4. The time now is 03:58 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-11 in 0.14 seconds with 19 queries on phoenix via your IP 54.226.113.250