NexusFi: Find Your Edge


Home Menu

 





Programmatically "drag chart left" Indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one hyperscalper with 14 posts (1 thanks)
    2. looks_two EDGE with 3 posts (6 thanks)
    3. looks_3 forrestang with 3 posts (1 thanks)
    4. looks_4 SamirOfSalem with 3 posts (0 thanks)
      Best Posters
    1. looks_one EDGE with 2 thanks per post
    2. looks_two userque with 1 thanks per post
    3. looks_3 Jasonnator with 1 thanks per post
    4. looks_4 forrestang with 0.3 thanks per post
    1. trending_up 5,867 views
    2. thumb_up 10 thanks given
    3. group 5 followers
    1. forum 24 posts
    2. attach_file 1 attachments




 
Search this Thread

Programmatically "drag chart left" Indicator

  #21 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 314 since Apr 2020
Thanks Given: 15
Thanks Received: 522


SamirOfSalem View Post
If you're already almost there with the mouse-drag solution, there's really no point taking another route.

But just to explain the idea, look at how NinjaTrader deals with multi-timeframe charts like the one below (it'll be even more obvious if you overlay say 15min on 60 min, or 60 min on 1 day, etc). There seems to be some kind of pro-rating going on, with NT distributing the space available on the X-axis by approximating date/time values.

But in all cases, the latest candle in terms of timestap is what would print on the far right.

The idea is to create a fictitious candle, forwarded in time with say 15 minutes, or maybe given a fixed date "tomorrow". I'm hoping that fictitious candle will remain THE right most candle, while the ticks bars play catch-up. If THEIR dates are always earlier than that fictitious candle, they should paint farther to the left of it, i.e. somewhere in the middle of the chart window.

And just when the ticks candles are about to catch up with that "tomorrow" candle, we reset its date so that again it distances itself from the ticks bars, forcing NT to recalculate and pro-rate their positions since their timestamps are behind the tomorrow candle. As the ticks bars try to play catch-up again, they should paint somewhere in the middle. The chart is refreshed only once every so often, when we create a new date for the "tomorrow" candle.

So basically the idea is to make the ticks bars play catch-up to a tomorrow that never comes. It might work if you're looking for an all-Ninjascript approach.


THE MOUSE THING IS BY NO MEANS WITHOUT ITS WEAKNESSES. I plan to really study
your proposal, and I had some similar ideas earlier. Another approach, with similar
weaknesses, is to SEND MOUSEWHEEL events to scroll a chart left.

DO YOU HAVE TIME or inclination to provide some code for this idea of yours; which could
very well be the best available solution?.... I REALLY APPRECIATE your idea; and I am
not yet sure which way I'll try to go to implement this behavior.

[edit] I'd like to run on a 1 second interval chart; or on a Tick Chart with only a few
Ticks per bar; so it should work on those timescales during an active market. I had
been thinking of having a "future" bar on the same timescale as the Chart, but in
the Indicator's Plot series; but I'm not sure that would work, though have not
seriously investigated it.

Thanks again,
hyperscalper

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
What broker to use for trading palladium futures
Commodities
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Cheap historycal L1 data for stocks
Stocks and ETFs
Better Renko Gaps
The Elite Circle
 
  #22 (permalink)
 SamirOfSalem   is a Vendor
 
Posts: 74 since Jan 2020
Thanks Given: 23
Thanks Received: 44


hyperscalper View Post
THE MOUSE THING IS BY NO MEANS WITHOUT ITS WEAKNESSES. I plan to really study
your proposal, and I had some similar ideas earlier. Another approach, with similar
weaknesses, is to SEND MOUSEWHEEL events to scroll a chart left.

DO YOU HAVE TIME or inclination to provide some code for this idea of yours; which could
very well be the best available solution?.... I REALLY APPRECIATE your idea; and I am
not yet sure which way I'll try to go to implement this behavior.

[edit] I'd like to run on a 1 second interval chart; or on a Tick Chart with only a few
Ticks per bar; so it should work on those timescales during an active market. I had
been thinking of having a "future" bar on the same timescale as the Chart, but in
the Indicator's Plot series; but I'm not sure that would work, though have not
seriously investigated it.

Thanks again,
hyperscalper

Unfortunately I don't. I'd look up something like the Mirrored Bars add-on from the NinjaTrader website and start from there.

To backtrack a little, have you tried TeamViewer for your remote access instead of RDP? TV is free for personal use and does a helluva job of preventing lag, even with a bunch of charts and indicators running on the remote machine.

Reply With Quote
  #23 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 314 since Apr 2020
Thanks Given: 15
Thanks Received: 522



SamirOfSalem View Post
Unfortunately I don't. I'd look up something like the Mirrored Bars add-on from the NinjaTrader website and start from there.

To backtrack a little, have you tried TeamViewer for your remote access instead of RDP? TV is free for personal use and does a helluva job of preventing lag, even with a bunch of charts and indicators running on the remote machine.

Thanks for the TeamViewer tip. But Remote Desktop is doing a really great job of eliminating Lag;
and it also spans 2 monitors very well. I gotta give Microsoft some kudos on that. I give mstsc.exe
a high priority locally; and have the network very well optimized by using the CTCP Congestion also (highly recommended). This faster network algo is used both on the Client and dedicated Server side where Windows Server 2012 is being used.

THIS NETWORK OPTIMIZATION is a must for Traders and Gamers.

Thanks for the info, I'll take a look at the NinjaTrader examples,
hyperscalper

Started this thread Reply With Quote
  #24 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047

When I asked on the NT forum for a sample of sending a simulated keyboard event, I was recommended THIS indicator for a study case. I havent' dug into hard yet, but may give an idea of how to do this?

Reply With Quote
  #25 (permalink)
 hyperscalper 
boise idaho
 
Experience: Advanced
Platform: NinjaTrader C# Custom
Broker: NinjaTrader LeeLoo Rithmic
Trading: Nasdaq Futures NQ/MNQ
Posts: 314 since Apr 2020
Thanks Given: 15
Thanks Received: 522


forrestang View Post
When I asked on the NT forum for a sample of sending a simulated keyboard event, I was recommended THIS indicator for a study case. I havent' dug into hard yet, but may give an idea of how to do this?

Yeah, that's the one they use. Frankly a poor excuse for "support" in the context
of the issue I have; but that's their "go to" example, apparently.

hyperscalper

Started this thread Reply With Quote




Last Updated on March 29, 2021


© 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