NexusFi: Find Your Edge


Home Menu

 





My Indicator Thread- Just a placeholder


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one forrestang with 33 posts (33 thanks)
    2. looks_two Kharmaz with 4 posts (1 thanks)
    3. looks_3 maxuscz with 4 posts (0 thanks)
    4. looks_4 jmont1 with 3 posts (1 thanks)
      Best Posters
    1. looks_one forrestang with 1 thanks per post
    2. looks_two JayB with 0.5 thanks per post
    3. looks_3 jmont1 with 0.3 thanks per post
    4. looks_4 Kharmaz with 0.3 thanks per post
    1. trending_up 17,555 views
    2. thumb_up 40 thanks given
    3. group 19 followers
    1. forum 61 posts
    2. attach_file 29 attachments




 
Search this Thread

My Indicator Thread- Just a placeholder

  #21 (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


jmont1 View Post
So I do not need to get to the more specific per second and will be running it using price change not on every tick so do not waste time and effort for that. Tested it against multiple instruments and multiple accounts and it seems to differentiate correctly.
If you are willing to add effort then I would appreciate being able to move the timer since i have others that are in lower left. Or would help if I could raise it a number of ticks on the left so I could place it say 6 ticks above bottom. But probably easier to simply use the place in the the corners.

So I can add more adjustability in the timer's position. I planned on doing that after you run the indicator as-is for a week or so. I don't know exactly when it destroys old entries, but I noticed yesterday, I had a trade on early AM, let it run through the session, and as the NEW session started, it lost track of that trade, even though I still had a position on. So I think it may not only be on a PC restart that it loses trades, but may be when a new session is encountered? Depending on how you trade, this may/may-not be an issue for you?

I was never sure weather this was just a thing you wanted to have... to have an idea of your current trade duration, or if you really needed to know exactly for every single trade you placed, how long it was active?

I had to ask some questions about using this account sync stuff on NT's forum, and one gentleman mentioned he had a similar issue, and the only way to really get accuracy of all LIVE trades taken, was to write/read from a text file created.

But at any rate, yes I can add some more movement of the text, but run the indie for a while and be sure it mostly works through various conditions, that way I dont have to mess with it more than necessary. I'll probably add similar customization for text that is in my BetterBarTimer indie.



jmont1 View Post
Additionally, to be able to use this with a Strategy Builder BOT would require being able to "see" the time. Strategy Builder can only see "int's" and not doubles but I have never tried seeing a time. Any thoughts on how this could be exposed as an Int by a transparent plot by reading the hour and minute, then converting to minutes and plotting that int? So 1 hour and 44 minutes would plot transparently as 104 (60 + 44.) My use case would not need more than the minute info. So if the time was always rounded to closest minute and plotted transparently with the show transparent plots in data box I believe I could use it.

Ok... so a few things.

THIS indicator, as-is, is built with the mind of LIVE trades, placed manually. If it were me, I wouldn't use this particular indie for a strategy, or linked to a strategy at all. If it were me, and I were going to connect something like this to a bot, I would do it a different way.

If you were going to use a strategy, it would actually be easier to do the things you want to do.

If you need a strategy to see time in a trade, you can simply set a flag anytime a trade is taken, and store the time. On each bar/tic, you compare CURRENT time to the time set on last trade entry, using the TotalMinutes method, like so:
 
Code
double timeSince = (Time[0] - tradeEntryTime).TotalMinutes;
Where Time[0] would be the current DateTime of where the strat currently is, and tradeEntryTime is a DateTime you stored on your last entry. It would be captured like:

 
Code
if(entry long was taken)
    tradeEntryTime = Time[0];


Next, if you want to create something that will expose the times... you can actually expose variables(ints, doubles, bools, etc), dataseries OR plots. That's where you add them in the "properties" section below onBarUpdate. For the example, you can create a dataseries that will store the time in trade for each bar(using that totalMinutes example)... where it could be either a "-1" to indicate flat, or "0-∞" to indicate time in trade.

A good coding sample demonstrating exposing indicator values can be found HERE.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #22 (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


maxuscz View Post
Thank you so match, man
you spend lot of time with my stupid question. Now we know how it must worked 8)
Indicator name promise give me hope to get easy information about reversal bars. english is not my language and read how reversal bar must looked from PATs forum is not easy for me. 8) But im try (try to find easy way to do it 8-)
Still must say - you make good job. thank you

If you know another one indicator to detect reversal bars on ES chart - tell me.

best regards
Max

Happy to help out. But as ironic as it sounds, I don't actually use any indicators in my trading, so I wouldn't be able to advise you on any good reversal indicators.

Started this thread Reply With Quote
Thanked by:
  #23 (permalink)
 emazing 
Montreal
 
Experience: Intermediate
Platform: Ninjatrader
Trading: ZB
Posts: 52 since Apr 2011
Thanks Given: 16
Thanks Received: 15


Hi forrestang, I love the "bar timer" you created! Would it be possible to get the bar timer to actually float together with the current price? That would be really awesome!!!

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


emazing View Post
Hi forrestang, I love the "bar timer" you created! Would it be possible to get the bar timer to actually float together with the current price? That would be really awesome!!!

Thanks, that is on the list.

I was also think about adding the option to change to a countdown color if desired... I.e., if user sets 10 seconds, and time hits 10 seconds, change the color to something else for that last 10 seconds.

Started this thread Reply With Quote
  #25 (permalink)
 emazing 
Montreal
 
Experience: Intermediate
Platform: Ninjatrader
Trading: ZB
Posts: 52 since Apr 2011
Thanks Given: 16
Thanks Received: 15

Yeah, that with the countdown color changing colors when it gets to a certain number, that one I have already. Unfortunately it works only on volume & tick bars. No time based bars ((

Reply With Quote
  #26 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,175
Thanks Received: 6,020

An idea for a simple system:

[EDIT]
It would be cool if you could add an alert when a new count is detected. For example, in the charts i posted, we could set an alert for a count == 2 say when price gets a x points from forming.
...
Alert upcoming count: "sound file abc"
Points away to alert: 1
...
[/EDIT]

When we have a higher or equal count == 2 go long at the open of the bar following a count == 1. Stop loss when price closes below the low of the bar at count == 2


To be clear, two levels to enter:


Some entries for today:


Some more...


This was today:

Reply With Quote
  #27 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,175
Thanks Received: 6,020

@forrestang

Just realised i was too quick and did not fully understoo how your indicator was rendering a new count. The simple system idea is still doable but it would need some more nuances. Sorry false alert.

Reply With Quote
  #28 (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


trendisyourfriend View Post
@forrestang

Just realised i was too quick and did not fully understoo how your indicator was rendering a new count. The simple system idea is still doable but it would need some more nuances. Sorry false alert.

Since you said false alert, I didn't look into it much.

But was the issue that you just didn't see WHEN that fractal was rendered? I.e., the fractal number appears to the left of where the signal was actually detected?

If so... use the 'showtriggers' bool, and maybe you can further refine what you were thinking, as that well show you WHEN on the chart the most recent fractal occurred.

Started this thread Reply With Quote
Thanked by:
  #29 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,175
Thanks Received: 6,020


forrestang View Post
Since you said false alert, I didn't look into it much.

But was the issue that you just didn't see WHEN that fractal was rendered? I.e., the fractal number appears to the left of where the signal was actually detected?

If so... use the 'showtriggers' bool, and maybe you can further refine what you were thinking, as that well show you WHEN on the chart the most recent fractal occurred.

Exactly didn't estimate correctly the timing for WHEN that fractal was rendered.

Reply With Quote
  #30 (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



Started this thread Reply With Quote
Thanked by:




Last Updated on May 12, 2022


© 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