NexusFi: Find Your Edge


Home Menu

 





Draw a arraw in "all charts" of a same instrument


Discussion in NinjaTrader

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




 
Search this Thread

Draw a arraw in "all charts" of a same instrument

  #1 (permalink)
 
pcomm69's Avatar
 pcomm69 
paris france
 
Experience: Advanced
Platform: NinjaTrader
Broker: Continuum
Trading: gold & crude light
Posts: 55 since Oct 2011
Thanks Given: 14
Thanks Received: 4

Hi,

To draw arraw the syntax is :
DrawArrowUp("tag6", false,0,Closes[0][0], Color.Yellow);

I have an indicator on a graph with made calcul and draw an arrow

How can I report automaticly the same draw il "all charts" of the same instrument ?
(for instance this charts are open : UT 2, UT 15, 100 Ticks)

Thanks
P.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Build trailing stop for micro index(s)
Psychology and Money Management
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Futures True Range Report
The Elite Circle
 
  #3 (permalink)
 
gregid's Avatar
 gregid 
Wrocław, Poland
 
Experience: Intermediate
Platform: NinjaTrader, Racket
Trading: Ockham's razor
Posts: 650 since Aug 2009
Thanks Given: 320
Thanks Received: 623


You could achieve this with some static object in your indicator, place this indicator on every chart you want to have it drawn onto and in the indicator monitor the content of the indicator.
So in the simplest form if you would have
 
Code
private bool isMaster;
private static double CommonPriceLevel;
private double LastArrowPrice;
the static object will be common across instances of the indicator than in your indicator you would have a condition like:
 
Code
if (LastArrowPrice != CommonPriceLevel)
{
    DrawArrowUp("tag6", false,0,CommonPriceLevel, Color.Yellow);
    LastArrowPrice = CommonPriceLevel;
}
Assuming only one instance would give signals so this one would use:
 
Code
if (isMaster)
{
    if(someConditionIsMet)
    {
        CommonPriceLevel = Closes[0][0];
    }
}
You can play with this idea and use other static objects, eg. List, Dictionary, struct, class, etc. that can hold more info.

Reply With Quote
Thanked by:
  #4 (permalink)
 
pcomm69's Avatar
 pcomm69 
paris france
 
Experience: Advanced
Platform: NinjaTrader
Broker: Continuum
Trading: gold & crude light
Posts: 55 since Oct 2011
Thanks Given: 14
Thanks Received: 4

Hi Gregid

Thank you so much
You are like the "cavalery", just in time with the good answer
I don t know the static object, but the idea smel good
My brain say "Gratte Gratte", give me time to work that
I will give you news

Thanks a lot

Pierre

Started this thread Reply With Quote




Last Updated on May 14, 2015


© 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