Setting a static profit target - futures io
futures io futures trading



Setting a static profit target


Discussion in NinjaTrader

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




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Setting a static profit target

(login for full post details)
  #1 (permalink)
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
 
toddma's Avatar
 
Posts: 53 since Jul 2012
Thanks: 14 given, 6 received

Does anyone know of a way to have an exit signal based on the bar that caused the entry signal?

For example:
If the bar that caused the entry signal was size A (close minus open) then set the profit target equal to size B (open minus close * 2) of that specific bar though. That is the key, I have it so that it moves along looking at the last bar and doing that calculation, however, I need it to fix on the original bar.

Any ideas?
Thanks in advance

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
NT8 indicator to simulate a Funding Evaluation where to …
NinjaTrader
Regarding Multicharts strategy trigger
MultiCharts
Help Needed: TOS Options Chain IV & IMPL MOVE Calcul …
ThinkOrSwim
Cross border fund flows / fx correlations
Treasury Notes and Bonds
ZigZag with Depth and Backstep
EasyLanguage Programming
 
 
(login for full post details)
  #2 (permalink)
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 839 received

Forgetting my ninjascript, but maybe try something like,


target.Set(Position.MarketPosition = MarketPosition.Flat ? (math.abs(Open[0] - Close[0])*2)/TickSize : target[1]);
SetProfitTarget("LongSignal", CalculationMode.Ticks, target[0]);


Logic being the target will continually update until you enter a position, presumably at bar open, then target will keep referring to the prior target figure until the position is closed. Anyone feel free to correct me if that is wrong or better way to do it.

Reply With Quote
The following user says Thank You to vegasfoster for this post:
 
(login for full post details)
  #3 (permalink)
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
 
toddma's Avatar
 
Posts: 53 since Jul 2012
Thanks: 14 given, 6 received


Apologies - this is quite a bit over my head at the moment. The scripts that I am writing are a lot simpler.
Do I replace the SetProfitTarget line with this? If so I am getting the following errors:

The name "math" does not exist
The name "target" does not exist

Or do I need to define the following terms somewhere?
Thank a lot for your help,
Todd

Started this thread Reply With Quote
 
(login for full post details)
  #4 (permalink)
Legendary Market Wizard
Georgia, US
 
Experience: None
Platform: SC
Broker: AMP+CQG
Trading: ES, HSI, Nikkei
 
josh's Avatar
 
Posts: 5,466 since Jan 2011
Thanks: 6,054 given, 14,510 received


toddma View Post
Does anyone know of a way to have an exit signal based on the bar that caused the entry signal?

For example:
If the bar that caused the entry signal was size A (close minus open) then set the profit target equal to size B (open minus close * 2) of that specific bar though. That is the key, I have it so that it moves along looking at the last bar and doing that calculation, however, I need it to fix on the original bar.

Any ideas?
Thanks in advance

A question on the logic: the market knows of no such thing as "bars" or "candles" -- so, why would you set your stop or profit target based on it?

Reply With Quote
 
(login for full post details)
  #5 (permalink)
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
 
toddma's Avatar
 
Posts: 53 since Jul 2012
Thanks: 14 given, 6 received

The strategy is very short term in nature. It is only concerned with the most recent level of volatility and it should complete within 1-3 bars after the trade takes place (ideally). If we're in the middle of a strong move the target should be larger, if we're in a consolidation phase the target may be very small.

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Setting a static profit target


Last Updated on July 31, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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