Trigger event in Strategy from Indicator - NinjaTrader Programming | futures io social day trading
futures io futures trading


Trigger event in Strategy from Indicator
Updated: Views / Replies:393 / 11
Created: by vantojo Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 1  
 
Thread Tools Search this Thread
 

Trigger event in Strategy from Indicator

  #1 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

Trigger event in Strategy from Indicator

Hello,

For NT 7

I want to keep a de-coupled architecture, and send an instant trade alert to a running strategy from an indicator.

I want to have one strategy listening for signals from multiple indicators or other strategies. This way I can concentrate the trade management in just one strategy.

I have a static global array working, but then the strategy needs a timer to watch for input.

Would rather just have the indicator send the signal direct to the strategy.

Any suggestions, samples?

How would the strategy "register itself" in the indicator, so the indicator could communicate?

Many thanks

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,488 since Sep 2013
Thanks: 1,703 given, 3,691 received
Forum Reputation: Legendary



vantojo View Post
Hello,

For NT 7

I want to keep a de-coupled architecture, and send an instant trade alert to a running strategy from an indicator.

I want to have one strategy listening for signals from multiple indicators or other strategies. This way I can concentrate the trade management in just one strategy.

I have a static global array working, but then the strategy needs a timer to watch for input.

Would rather just have the indicator send the signal direct to the strategy.

Any suggestions, samples?

How would the strategy "register itself" in the indicator, so the indicator could communicate?

Many thanks

Why would you do the order management in a strategy and be stuck to one instrument ?

you could have a small stand alone process outside NT that is listening for the triggers,
and if you like, then create an order through the ATI interface, but keep the order mgt
completely outside of a strategy running.

the strategy is BAD anyway, you close manual an order, the strategy and all it's objects
get resetted, not a good idea for something that will hold you logic...

Reply With Quote
 
  #4 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

reply

Well, there would be one strategy running for each instrument. And somehow the indicator would need to match/sync to the strategy with the same Instrument.

I'm not a C# guy or a .Net guy....don't have enough skill to have something "outside" of NT setup.

Yes, I don't like the way the Strategy base is designed in NT...that NT disables the strategy when even a non-attached Chart ATM is closed.

I already do order management in an indicator with OIF. But there are lots of disadvantages to doing this, one being that the backtesting is not integrated with the strategy stats, et cetera. And, no prototypingwith the Strategy Analyzer.

Reply With Quote
 
  #5 (permalink)
Elite Member
Omer עומר / Israel י
 
Futures Experience: Master
Platform: NinjaTrader, Proprietary,
Broker/Data: Ninjabrokerage/IQfeed + Synthetic datafeed
Favorite Futures: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
 
rleplae's Avatar
 
Posts: 2,488 since Sep 2013
Thanks: 1,703 given, 3,691 received
Forum Reputation: Legendary


vantojo View Post
Well, there would be one strategy running for each instrument. And somehow the indicator would need to match/sync to the strategy with the same Instrument.

I'm not a C# guy or a .Net guy....don't have enough skill to have something "outside" of NT setup.

Yes, I don't like the way the Strategy base is designed in NT...that NT disables the strategy when even a non-attached Chart ATM is closed.

I already do order management in an indicator with OIF. But there are lots of disadvantages to doing this, one being that the backtesting is not integrated with the strategy stats, et cetera. And, no prototypingwith the Strategy Analyzer.

I guess you have your answer then...

Reply With Quote
 
  #6 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received

You can try using named pipes with objects like NamedPipeClientStream, coding in C# is required but it's not very hard.
Your strategy can listen to this pipe(s) and act depending on what is received.
On the other side indicators or strategies can send "something" to this master strategy.


vantojo View Post
Hello,

For NT 7

I want to keep a de-coupled architecture, and send an instant trade alert to a running strategy from an indicator.

I want to have one strategy listening for signals from multiple indicators or other strategies. This way I can concentrate the trade management in just one strategy.

I have a static global array working, but then the strategy needs a timer to watch for input.

Would rather just have the indicator send the signal direct to the strategy.

Any suggestions, samples?

How would the strategy "register itself" in the indicator, so the indicator could communicate?

Many thanks


Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #7 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

.................

I was playing with TCP before and it might work...I could assign an instrument to a single port in the loopback and then have that be the matching between indicator ??

this would allow more than one instrument, each instrument having one strategy and possibly multiple indicators talking to it over a singe port

have not looked at named pipes yet....

But, was hoping for something simplier...like

.... having the indicator trigger an event in the (decoupled) strategy

but how to match the two?

Reply With Quote
 
  #8 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received


vantojo View Post
I was playing with TCP before and it might work...I could assign an instrument to a single port in the loopback and then have that be the matching between indicator ??

this would allow more than one instrument, each instrument having one strategy and possibly multiple indicators talking to it over a singe port

have not looked at named pipes yet....

But, was hoping for something simplier...like

.... having the indicator trigger an event in the (decoupled) strategy

but how to match the two?

What you can do is:
- in the strategy
-> create a "service" thread
-> this service thread will read what's coming in from a namedpipe
-> if it's for a new instrument create a new thread with a new namedpipe for this specific instrument (which will be the same as the sender's namedpipe)
Then you can play with events in each threads to buy/sell or whatever you want.
I did something like to hedge two different accounts positions, it worked well, you can use the same kind of logic.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #9 (permalink)
Elite Member
Neuquen, Argentina
 
Futures Experience: Intermediate
Platform: Ninja
Favorite Futures: CL, TF, 6S, NG, sometimes GC
 
Posts: 195 since Jul 2012
Thanks: 25 given, 39 received

thanks

Thank you...will look at named pipes...seems not too hard...

can you post a sample of the service method code?

(just the core, not your private algos...)

:-)

Reply With Quote
 
  #10 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received



vantojo View Post
Thank you...will look at named pipes...seems not too hard...

can you post a sample of the service method code?

(just the core, not your private algos...)

:-)

In fact there is more simpler than pipes with TriggerCustomEvent().
You can check this example:
- the indicator TransferToStrategy contains the entry/exit logic (very private algo: buy if bar is up, sell if bar is down )
- the TransferMaster strategy is executing orders signal sent by the indicator
- the TransferSlave strategy is executing orders signal sent by the indicator (which is the opposite of the what TransferMaster sent)

Success requires no deodorant! (Sun Tzu)
Attached Files
Register to download File Type: zip Transfer.zip (3.0 KB, 4 views)
Reply With Quote

Reply



futures io > > > > > Trigger event in Strategy from Indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trigger Lines Indicator jmac904 Trading Journals 1 August 30th, 2017 10:51 AM
OnOrderUpdate event in Indicator? vantojo NinjaTrader Programming 7 July 10th, 2016 01:40 PM
Bloodhound/Raven to trigger separate Ninja strategy? Silent warrior The Elite Circle 7 January 21st, 2016 03:26 AM
PlotColors as strategy trigger microsat NinjaTrader Programming 7 September 18th, 2015 06:36 PM
A 60% event. How can I put it, into a succesfull strategy? Or why is it not possibel? Ironman9973 Elite Automated Trading 29 July 9th, 2013 04:02 AM


All times are GMT -4. The time now is 07:19 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-13 in 0.14 seconds with 20 queries on phoenix via your IP 54.196.182.102