NexusFi: Find Your Edge


Home Menu

 





Indicator to strategy best practices


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one trendwaves with 1 posts (1 thanks)
    2. looks_two AA Ron with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 Maza with 1 posts (1 thanks)
    1. trending_up 1,179 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

Indicator to strategy best practices

  #1 (permalink)
AA Ron
denver, colorado
 
Posts: 4 since Oct 2015
Thanks Given: 8
Thanks Received: 0

Hi all. I've recently completed my first usable custom indicator with NT7. I now want to connect this to a strategy, mostly so I can easily back test the success rate of the indicator. The indicator currently draws a vertical green line to show when buy criteria are met, and a vertical red line when sell criteria are met. Using the following code:

DrawVerticalLine("GoingShort "+ CurrentBar, 0, Color.Red);

When I attempt to implement this into a strategy it doesn't notice the vertical lines exist. Based on experience what is the best way to augment the code so that it will also send a usable buy signal to a strategy?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
Battlestations: Show us your trading desks!
43 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #3 (permalink)
 
trendwaves's Avatar
 trendwaves 
Florida
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader 8
Trading: ES, NQ, CL
Posts: 703 since Dec 2012
Thanks Given: 2,898
Thanks Received: 2,525



AA Ron View Post
Hi all. I've recently completed my first usable custom indicator with NT7. I now want to connect this to a strategy, mostly so I can easily back test the success rate of the indicator. The indicator currently draws a vertical green line to show when buy criteria are met, and a vertical red line when sell criteria are met. Using the following code:

DrawVerticalLine("GoingShort "+ CurrentBar, 0, Color.Red);

When I attempt to implement this into a strategy it doesn't notice the vertical lines exist. Based on experience what is the best way to augment the code so that it will also send a usable buy signal to a strategy?

One way is to set a public boolean in your indicator at the time it draws the vertical line which your strategy would then use to know when to place the appropriate buy or sell order.

Be Patient and Trade Smart
Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to trendwaves for this post:
  #4 (permalink)
 Maza 
Cluj-Napoca Cluj/Romania
 
Experience: Intermediate
Platform: NinjaTrader, MetaTrader 4
Broker: FXCM, Continuum
Trading: Forex, Futures
Posts: 12 since Apr 2013
Thanks Given: 6
Thanks Received: 7


trendwaves View Post
One way is to set a public boolean in your indicator at the time it draws the vertical line which your strategy would then use to know when to place the appropriate buy or sell order.

I use the same thing as trendwaves except I use an int, and have it set to 0 when it's neutral, then when it gets a buy I set it to a 1 and when it gets a sell signal I set it to a -1.

Reply With Quote
The following user says Thank You to Maza for this post:





Last Updated on January 18, 2016


© 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