NexusFi: Find Your Edge


Home Menu

 





Pushing the ChartTrader CLOSE button from Indicator Code


Discussion in NinjaTrader

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




 
Search this Thread
  #1 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012

Any suggestions on how to have Ninja script (indicator) push the CLOSE button on Chart Trader....

This is what I am doing but it is not doing anything....

The Print is working OK

Thank you!


==============================================================================

System.Windows.Forms.Button CloseButton;

CloseButton = (Button)ChartControl.Controls["pnlChartTrader"].Controls["ctrChartTraderControl"].Controls["btnClose"];

CloseButton.PerformClick();

Print (CloseButton.Text);


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
AI for Traders — Agents, Memory, Tools & Real-Worl …
Elite Quantitative GenAI/LLM
Bitcoin’s 2022 low, 2025 high and 2026 low so far arou …
Cryptocurrency
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
No book, only a stair: journaling fills where price move …
Cryptocurrency
Building a free browser DOM/SMC simulator - need some ad …
Platforms and Indicators
 
  #3 (permalink)
 steve2222 
Auckland, New Zealand
 
Experience: Beginner
Platform: Sierra Chart
Broker: AMP/CQG
Trading: Whatever moves in my timezone
Posts: 1,319 since Sep 2009
Thanks Given: 3,379
Thanks Received: 1,540


Have a look at the code in this indicator:


Reply With Quote
Thanked by:
  #4 (permalink)
 vantojo 
Vilcabamba, Ecuador
 
Experience: Intermediate
Platform: Ninja
Trading: NQ, UB
Posts: 204 since Jul 2012

yes, that seems to work where PerformClick did not

initial testing shows it is cancelling unexecuted orders and open positions on a live account

THANK YOU!


Started this thread Reply With Quote




Last Updated on January 21, 2014


© 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