NexusFi: Find Your Edge


Home Menu

 





Horizontal Line Drawn At A Certain Time


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,957 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Horizontal Line Drawn At A Certain Time

(login for full post details)
  #1 (permalink)
OccamsRazorTrader
Fort Myers Florida/USA
 
Posts: 70 since May 2020
Thanks Given: 43
Thanks Received: 66

I've managed to code my algorithm in EL for trading. My current research is focused on differentiating between 'Last Price' Vs. Settlement Price. Websites with data will show 'Last Price' but are actually portraying the settlement price. In certain times, like earnings season, the differences between the prices can be somewhat large. Is it possible to draw a horizontal line at the last price on a chart @ 16:59:59 yesterday, which would be the true last price. So instead of the horizontal line tied to a price- the line is tied to the last price at a certain time ...........
Any help is appreciated ...........

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Your experience with VPS Ninjamobiletrader ?
Trading Reviews and Vendors
Price Action Swing Pro
Traders Hideout
Tradestation historical data to be used in NinjaTrader 8
Platforms and Indicators
Optimal Futures Trading Workflow
Platforms and Indicators
Do 5-days or 7-days constitute a Multiweek Channel?
Currencies
 

(login for full post details)
  #2 (permalink)
Kolnidrei
Lyon/France
 
Posts: 23 since Aug 2012
Thanks Given: 1
Thanks Received: 14

hi

Quoting 
Input:
MyTime(165959);
Var:
x(0);

if time = mytime then x = C;
if x <> 0 then Plot(x);


Reply With Quote
The following user says Thank You to Kolnidrei for this post:
(login for full post details)
  #3 (permalink)
OccamsRazorTrader
Fort Myers Florida/USA
 
Posts: 70 since May 2020
Thanks Given: 43
Thanks Received: 66


Thanks I can't get it to plot- it might be something with scaling, I changed Plot(x)to Plot1(x).
But that didn't help- I'll play with it some more.
Is there a way to do that same time but the day before [1] ?
Thank you for your help.

Reply With Quote
(login for full post details)
  #4 (permalink)
Kolnidrei
Lyon/France
 
Posts: 23 since Aug 2012
Thanks Given: 1
Thanks Received: 14

hi, try

Quoting 
plot1(x,"hl",cyan);

I don't understand what you want to achieve.
If it's the previous day's value and you use an intradychart
you risk to get the same value with x[1].
So you would need to introduce a second variable y
and every time transfer the values with

Quoting 
Input:
MyTime(165959);
Vars:
x(0),y(0);

if time = mytime then begin
y = x;
x = C;
end;
if y <> 0 then Plot1(y,"hl",cyan);


Reply With Quote
(login for full post details)
  #5 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Posts: 8,088 since Jan 2013
Thanks Given: 56,723
Thanks Received: 26,032


Kolnidrei View Post
hi, try

I don't understand what you want to achieve.
If it's the previous day's value and you use an intradychart
you risk to get the same value with x[1].
So you would need to introduce a second variable y
and every time transfer the values with

Hi @Kolnidrei,

FYI, you might want to use the CODE tags instead of QUOTE. (Click # icon on the menu bar in the editor.) It makes it a little more clear that you are proposing new code, not quoting something already posted:

 
Code
Input:
MyTime(165959);
Vars:
x(0),y(0);

if time = mytime then begin
y = x;
x = C;
end;
if y <> 0 then Plot1(y,"hl",cyan);

Just formatting, but it might be better for what you are doing.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
(login for full post details)
  #6 (permalink)
Kolnidrei
Lyon/France
 
Posts: 23 since Aug 2012
Thanks Given: 1
Thanks Received: 14

hi Bob,

thank you for your notice, I was looking for it,
for some reason I didn't find it that's why I used 'Quote',
now I saw it !

Reply With Quote





Last Updated on June 20, 2022


© 2023 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