NexusFi: Find Your Edge


Home Menu

 





Intraday indicator using daily ans weekly datas


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Big Mike with 3 posts (0 thanks)
    2. looks_two nunoonline with 3 posts (0 thanks)
    3. looks_3 dhanamala87 with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 5,080 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

Intraday indicator using daily ans weekly datas

  #1 (permalink)
nunoonline
France
 
Posts: 10 since Apr 2010
Thanks Given: 7
Thanks Received: 0

Hi

i want to create an intraday indicator using daily and weekly data in order to use this one in an scanner

With the help of siscop, i tested the indicator in a daily chart and it's ok
But when i insert this indicator in an intraday chart, i don't have the same result.
Is it wrong?

 
Code
// code function _fHighestD
inputs: 
   Len(numericsimple);
variables: 
   var0(0);

var0=HighD(0);
for Value1 = 1 to Len - 1 
begin
   if HighD(Value1)>var0 then
      var0=HighD(Value1);
end ;

_fHighestD=var0;
 
Code
// Code function _fLowestD
inputs: 
   Len(numericsimple);
variables: 
   var0(0);

var0=LowD(0);
for Value1 = 1 to Len - 1 
begin
   if LowD(Value1)<var0 then
      var0=LowD(Value1);
end ;

_fLowestD=var0;
 
Code
// Code Indicator
Inputs: 
   Length1(10), Length2(5), Length3(5), UpColor(Green), DnColor(Red), AlertLevel(40);
   
Var: 
   Day.HH(0), Day.LL(0), Day.SMI(0);

Day.HH = _fHighestD(Length1);
Day.LL = _fLowestD(Length1);

Day.SMI = 100 * (XAverage(XAverage(CloseD(0)-(0.5*(Day.HH+Day.LL)),Length2),Length3) / (0.5 * XAverage(XAverage(Day.HH-Day.LL,Length2),Length3)));

Plot1(Day.SMI, "Day.SMI" );
Plot2(AlertLevel, "Sell Line" );
Plot3(-AlertLevel, "Buy Line" );

If Day.SMI> Day.SMI[1] then 
   begin
   Plot1[1](Day.SMI[1], "Day.SMI", Upcolor);
   Plot1(Day.SMI, "Day.SMI", Upcolor);
   end 
   else begin
   Plot1[1](Day.SMI[1], "Day.SMI", Dncolor);
   Plot1(Day.SMI, "Day.SMI", Dncolor);
   end;

thank you for your help

Nuno

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
What broker to use for trading palladium futures
Commodities
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
 
  #3 (permalink)
nunoonline
France
 
Posts: 10 since Apr 2010
Thanks Given: 7
Thanks Received: 0


Is there another way to scan a list of stocks in intraday once the daily and weekly setups are ok?

Reply With Quote
  #4 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,661

Can you be more specific as to what the problem is? You say "don't have the same result", but it isn't clear what the actual details or error is.

Screenshots are useful for troubleshooting.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
nunoonline
France
 
Posts: 10 since Apr 2010
Thanks Given: 7
Thanks Received: 0

Mike

# I tested the indicator in a daily chart
# i plotted the same indicator in an intraday chart
As you can see in the indicator's code, i use the function HighD(), LowD() and CloseD()
So the indicator's values in the intraday chart would be the same as the indicator's values in the daily chart
It is not the case and i don't know why


Nuno

Reply With Quote
  #6 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,661

OK, I've not used those before (highd, lowd, etc) - I just track it myself, something like:

 
Code
                            
if date <> date[1then begin


yesthigh 
todayhigh;
todayhigh H;
yestlow todaylow;
todaylow L;

end;

if 
todayhigh then todayhigh H;
if 
todaylow then todaylow L
Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
dhanamala87
DELHI
 
Posts: 1 since May 2011
Thanks Given: 0
Thanks Received: 0

Hi,

I am using easylanguage tradestation and i want to find out 1 hour high and low using 5 minutes movement..pls help me out in coding cos i tried in many ways but am not able include 1st bar high and low..

Reply With Quote
  #8 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,661


dhanamala87 View Post
Hi,

I am using easylanguage tradestation and i want to find out 1 hour high and low using 5 minutes movement..pls help me out in coding cos i tried in many ways but am not able include 1st bar high and low..

Typed by hand and not syntax checked, but something like this

 
Code
                            


vars
:
 
currenthour ("0"),
 
lasthour_high (0),
 
lasthour_low (0),
 
currenthour_high(0),
 
currenthour_low(0);

currenthour FormatTime("H"Time);

if 
currenthour <> currenthour[1then begin

 lasthour_high 
currenthour_high;
 
lasthour_low currenthour_low;

end
else
begin

 
if currenthour_high then currenthour_high H;
 if 
currenthour_low then currenthour_low L;

end
Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #9 (permalink)
SKTennis
Florida City, Florida
 
Posts: 4 since Feb 2014
Thanks Given: 2
Thanks Received: 0

I can see a of couple things here.

First, you are using the zero (0) value in your user functions calling the DayH and DayL - intra day this will be a moving value as the open days high and low will, or may, be changing.

You are also doing an XAverage using intraday bars, so it is not smoothing over multiple daily SMI values as it is on a daily chart. You are going to need to specially code your own XAverage to be calculated once per day and storing the previous days result for use.

The DayH and DayL may be treating date change as end of day not session end. These are very old functions that were created before electronic session became 24, or near 24, hour markets.

There are a number of changes that would need to be dome to make this study work as expected. Things to look into would include :

Using BarStatus to only compute once per day.
Deciding whether DayH and DayL return the value you wish to use.
Creating an actual Daily XAverage function.

Samuel K. Tennis

Reply With Quote




Last Updated on February 17, 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