Plot Time in MC Screener??? - futures io
futures io futures trading



Plot Time in MC Screener???


Discussion in MultiCharts

Updated by Jura
      Top Posters
    1. looks_one ChrisMoody with 4 posts (3 thanks)
    2. looks_two Jura with 2 posts (4 thanks)
    3. looks_3 SPMC with 2 posts (6 thanks)
    4. looks_4 MultiCharts with 1 posts (0 thanks)
    1. trending_up 2,123 views
    2. thumb_up 13 thanks given
    3. group 2 followers
    1. forum 7 replies
    2. attach_file 4 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,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
 

Plot Time in MC Screener???

(login for full post details)
  #1 (permalink)
Chapel Hill, NC
 
Experience: Advanced
Platform: Trade Navigator, MultiCharts, TOS
Broker: Stage 5, FXCM, IQ Feed
Trading: Futures, Forex, Options
 
ChrisMoody's Avatar
 
Posts: 12 since Aug 2011
Thanks: 22 given, 3 received

I'm new to MC....Going through my TradeStation Easy Language Home Study Course and there is one study for Radar Screen that I can't get to work with MC screener. It is supposed to show the time of day each symbol reaches it's High and Low price. The interval they used in the example is 5 minutes.

Example:

IBM - 5 Min - 09:35:00 AM (High) - 10:45:00 AM (Low)

The attached picture is showing the result I am getting. Any Help would be greatly appreciated.

Here is the Code I am using....

Var: DHigh(0), DLow(0), HighTime(0), LowTime(0);

If Date <> Date[1] then begin
DHigh = High;
DLow = Low;
HighTime = Time;
LowTime = Time;
end
else begin
If High > DHigh then
DHigh = High;
HighTime = Time;
end;
If Low < DLow then begin
DLow = Low;
LowTime = Time;
end;


Plot1 (HighTime, "HighTime");
Plot2 (LowTime, "LowTime");

It compiles but won't show the time. I've spent hours going thru there Help area and all reserved words that have to do with time.

Attached Thumbnails
Click image for larger version

Name:	ScreenerWindow.png
Views:	48
Size:	31.2 KB
ID:	51347  
Reply With Quote

Can you help answer these questions
from other members on futures io?
Implications of Alex Kearns' suicide
Traders Hideout
Two Data Series in Ninjatrader 7 for Order confirmation
NinjaTrader
Execute NT8-Optimizer by script
NinjaTrader
TOS script
ThinkOrSwim
Think or swim earnings move calculation
Brokers
 
 
(login for full post details)
  #2 (permalink)
The Netherlands
 
Experience: None
Platform: MultiCharts, TradingView
Trading: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 685 received


ChrisMoody View Post
It compiles but won't show the time. I've spent hours going thru there Help area and all reserved words that have to do with time.

Well, actually it does show the time, since the EasyLanguage word Time returns the time in 1115.00 format (i.e. 11:15 in the morning). For example:

 
Code
Print("Time of bar: ", time);
returns...

Quoting 
Time of bar: 1406.00
Time of bar: 1411.00
Time of bar: 1416.00
Time of bar: 1421.00
Time of bar: 1426.00
Time of bar: 1431.00
Time of bar: 1436.00
Time of bar: 1441.00
Time of bar: 1446.00
Time of bar: 1451.00
Time of bar: 1456.00
Time of bar: 1501.00
Time of bar: 1506.00
Time of bar: 1511.00
Time of bar: 1516.00
Time of bar: 1521.00
Time of bar: 1526.00
Time of bar: 1531.00
Time of bar: 1536.00

So in your screenshot, you'll see the ES reaching the High at 1,515.0, meaning 15:15:00 (or a quarter pas three in the afternoon).

(Btw, if you use Time_s (instead of Time), you'll also get the seconds.)

-> It's not possible to plot a string value in the Market Scanner, so there is no way around this to show you the time in "clean" format.

In other parts of EasyLanguage, where you can use strings, you can use:
 
Code
Print("Time of bar: ", FormatTime("HH:mm:ss", el_timetodatetime_s(time_s)) );
which gives the following output..

Quoting 
Time of bar: 09:10:09
Time of bar: 09:13:22
Time of bar: 09:15:53
Time of bar: 09:16:55
Time of bar: 09:19:45
Time of bar: 09:23:23
Time of bar: 09:23:55
Time of bar: 09:25:50
Time of bar: 09:29:34
Time of bar: 09:41:57
Time of bar: 09:44:14
Time of bar: 09:47:15
Time of bar: 09:53:00
Time of bar: 09:59:10
Time of bar: 10:01:53
Time of bar: 10:05:01
Time of bar: 10:05:29
Time of bar: 10:11:35
Time of bar: 10:18:02
Time of bar: 10:30:27

Regards,
Jura

Reply With Quote
The following 4 users say Thank You to Jura for this post:
 
(login for full post details)
  #3 (permalink)
Chapel Hill, NC
 
Experience: Advanced
Platform: Trade Navigator, MultiCharts, TOS
Broker: Stage 5, FXCM, IQ Feed
Trading: Futures, Forex, Options
 
ChrisMoody's Avatar
 
Posts: 12 since Aug 2011
Thanks: 22 given, 3 received


Jura,

Thanks so much for you help. Can I please get your input on one other issue. It seems to be showing the correct time for the low of the day, but not the high...

If you put the study below on a price chart it works perfectly by showing the Low and High of the day...but in the Screener using the code I used above it's not showing the correct time for the high...

If you take a look at symbol IWM for today the low was at 9:35 east coast and the high was at 3:50 or 15:50 but in the screener it is showing the high at 1805. The symbol is from the NYSE and I checked to make sure the sessions were correct and that it was set to East Coast time....any idea what is causing the High Time to be wrong????

Var: DHigh(0), DLow(0);

If Date <> Date[1] then begin
DHigh = High;
DLow = Low;
end
else begin
If High > DHigh then
DHigh = High;
If Low < DLow then
DLow = Low;
end;

If DLow <> 0 then begin
Plot1(DHigh, "DayHigh");
Plot2(DLow, "DayLow");
end;


Thanks Again for your input.....

Attached Thumbnails
Click image for larger version

Name:	Screener.png
Views:	27
Size:	30.8 KB
ID:	51647   Click image for larger version

Name:	IWMChart.png
Views:	36
Size:	41.1 KB
ID:	51648  
Reply With Quote
 
(login for full post details)
  #4 (permalink)
GER
 
Experience: Advanced
Platform: MC
Trading: ES
 
Posts: 144 since May 2011
Thanks: 11 given, 212 received

This should work
 
Code
 
Var:  DHigh(0), DLow(0), HighTime(0), LowTime(0);

If Date <> Date[1] then begin
DHigh = 0;
DLow = 999999;
HighTime = Time;
LowTime = Time;
end; // End here

If High > DHigh then begin
DHigh = High;
HighTime = Time;
end;
If Low < DLow then begin
DLow = Low;
LowTime = Time;
end;


Plot1 (HighTime, "HighTime");
Plot2 (LowTime, "LowTime");

Reply With Quote
The following 3 users say Thank You to SPMC for this post:
 
(login for full post details)
  #5 (permalink)
Chapel Hill, NC
 
Experience: Advanced
Platform: Trade Navigator, MultiCharts, TOS
Broker: Stage 5, FXCM, IQ Feed
Trading: Futures, Forex, Options
 
ChrisMoody's Avatar
 
Posts: 12 since Aug 2011
Thanks: 22 given, 3 received

Thanks that worked perfect....for some reason adding DHigh = 0; and DLow = 999999; changed the LowTime to a blue color plot that was hard to read with a black background....I added the 2 SetPlotColor's and everything is perfect....

PROBLEM SOLVED.....

Thanks Again....

 
Code
 

Var:  DHigh(0), DLow(0), HighTime(0), LowTime(0);

If Date <> Date[1] then begin
DHigh = 0;
DLow = 999999;
HighTime = Time;
LowTime = Time;
end; // End here

If High > DHigh then begin
DHigh = High;
HighTime = Time;
end;
If Low < DLow then begin
DLow = Low;
LowTime = Time;
end;


Plot1 (HighTime, "HighTime");
Plot2 (LowTime, "LowTime");

SetPlotColor (1, Green);
SetPlotColor (2, Red);

Reply With Quote
The following user says Thank You to ChrisMoody for this post:
 
(login for full post details)
  #6 (permalink)
GER
 
Experience: Advanced
Platform: MC
Trading: ES
 
Posts: 144 since May 2011
Thanks: 11 given, 212 received

For better reading create a new string function ELTimeToString with

 
Code
inputs: TimeSelect( numericsimple );
var: s(""),strl(0);
s = NumToStr(TimeSelect,0);
strl = strlen(s);
if      strl = 4 then
    ELTimeToString =       LeftStr(s,2) + ":" + RightStr(s,2)
else if strl = 3 then
    ELTimeToString = "0" + LeftStr(s,1) + ":" + RightStr(s,2)
else if strl = 2 then
    ELTimeToString = "00:" + RightStr(s,2)
else if strl = 1 then
    ELTimeToString = "00:0" + RightStr(s,1)
else if strl = 0 then
    ELTimeToString = "00:00";
and then use
Plot1 ( ELTimetoString(HighTime), "HighTime");
Plot2 ( ELTimetoString(lowtime), "LowTime");

Reply With Quote
The following 3 users say Thank You to SPMC for this post:
 
(login for full post details)
  #7 (permalink)
Chapel Hill, NC
 
Experience: Advanced
Platform: Trade Navigator, MultiCharts, TOS
Broker: Stage 5, FXCM, IQ Feed
Trading: Futures, Forex, Options
 
ChrisMoody's Avatar
 
Posts: 12 since Aug 2011
Thanks: 22 given, 3 received

SPMC....Thanks so much for going out of your way to help. It works perfect...

The attached photo shows where I started on the left study....and on the right is the study you helped me create....

Thanks Again....

Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2011-10-12 at 4.54.39 PM.png
Views:	35
Size:	34.2 KB
ID:	51757  
Reply With Quote
The following 2 users say Thank You to ChrisMoody for this post:
 
(login for full post details)
  #8 (permalink)
The Netherlands
 
Experience: None
Platform: MultiCharts, TradingView
Trading: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 685 received


SPMC View Post
Plot1 ( ELTimetoString(HighTime), "HighTime");
Plot2 ( ELTimetoString(lowtime), "LowTime");

Also a big thanks from me SPMC, I didn't know you could plot strings with EasyLanguage. Thanks for proving me wrong.

Regards,
Jura

Reply With Quote


futures io Trading Community Platforms and Indicators MultiCharts > Plot Time in MC Screener???


October 13, 2011


Upcoming Webinars and Events
 

Free BloodHound Licenses for everyone!

June
 

Every journal equals ten meals for the hungry

June
     



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