NexusFi: Find Your Edge


Home Menu

 





Accessing the clipboard from within an indicator


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
Tempo
Los Angeles
 
Posts: 8 since Feb 2011
Thanks Given: 4
Thanks Received: 0

I am wondering if anyone has tried to access the system clipboard (ctrl-c, ctrl-v, copy, paste) from within the code of an indicator to either obtain values to use in calculating the indicator, or to paste graphic objects directly into a chart, since lines, rectangles, and other graphic objects can be copied and pasted into a chart manually. I imagine it might be something like overriding the plot method, which seems to be an approach some use to plot to regions of the chart not accessible by the normal draw and plot methods. What seems to be available in the NinjaScript editor of the System.Windows.Forms namespace seems to be either a subset of, or alternative to, what's described in the MSDN library. Any thoughts or guidance in the form of examples or code snippets is much appreciated. Thanks, Tempo


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The Week Ahead -- CPI Wednesday With Oil Past $90, PPI L …
Traders Hideout
$12M Ceasefire Contract Goes Disputed as Bandar Abbas St …
Prediction Markets & Event Contracts
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
NYSE Owner ICE Invests in Crypto Exchange OKX at $25 Bil …
Cryptocurrency
CFTC Approves First US Bitcoin Perpetual Futures -- Kals …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,374



Tempo View Post
I am wondering if anyone has tried to access the system clipboard (ctrl-c, ctrl-v, copy, paste) from within the code of an indicator to either obtain values to use in calculating the indicator, or to paste graphic objects directly into a chart, since lines, rectangles, and other graphic objects can be copied and pasted into a chart manually. I imagine it might be something like overriding the plot method, which seems to be an approach some use to plot to regions of the chart not accessible by the normal draw and plot methods. What seems to be available in the NinjaScript editor of the System.Windows.Forms namespace seems to be either a subset of, or alternative to, what's described in the MSDN library. Any thoughts or guidance in the form of examples or code snippets is much appreciated. Thanks, Tempo

This is what I use in one of my strategies:

using System.Windows.Forms;
...
if (Clipboard.ContainsText (TextDataFormat.Text)) {
string str=Clipboard.GetText(TextDataFormat.Text);
}


Reply With Quote
Thanked by:
  #4 (permalink)
Tempo
Los Angeles
 
Posts: 8 since Feb 2011
Thanks Given: 4
Thanks Received: 0

Thank you for the speedy reply, Monpere. I will give it a shot in my indicator, and report back. If anyone else has thoughts, I would appreciate them, too.
Again, thanks
Tempo


Reply With Quote
  #5 (permalink)
Tempo
Los Angeles
 
Posts: 8 since Feb 2011
Thanks Given: 4
Thanks Received: 0

monpere,
That worked very nicely. Thanks.
Tempo


Reply With Quote




Last Updated on February 7, 2011


© 2026 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 - Downloads - Top
no new posts