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,207 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?
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
33 thanks
Just another trading journal: PA, Wyckoff & Trends
26 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
19 thanks
  #3 (permalink)
 
trendwaves's Avatar
 trendwaves 
Florida
Legendary 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
Thanked by:
  #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
Thanked by:




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