NexusFi: Find Your Edge


Home Menu

 





ChartTrader & Order Button size - width


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one monpere with 15 posts (28 thanks)
    2. looks_two ThatManFromTexas with 9 posts (18 thanks)
    3. looks_3 futuretrader with 8 posts (0 thanks)
    4. looks_4 lolu with 6 posts (0 thanks)
      Best Posters
    1. looks_one bukkan with 4.3 thanks per post
    2. looks_two ThatManFromTexas with 2 thanks per post
    3. looks_3 monpere with 1.9 thanks per post
    4. looks_4 TradingGuy with 1 thanks per post
    1. trending_up 23,954 views
    2. thumb_up 65 thanks given
    3. group 23 followers
    1. forum 66 posts
    2. attach_file 6 attachments




 
Search this Thread

ChartTrader & Order Button size - width

  #21 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371


lolu View Post
Is SetStopLoss(CalculationMode.Price, entryPrice +(2*TickSize) not a strategy code ?

Pls, could you give a typical example of a strategy call for BE ... the code(s) that call the strategy from within the ChartButtons indicator "to do something like SetStopLoss(CalculationMode.Price, entryPrice +(2*TickSize)".

What I want to do is code a BE action (just like the CLOSE action) into terratec's bTPA indicator.

Lolu

You cannot do advanced trade management with an indicator. The only order management method I know of that can be used inside and indicator is CreateOrder(). That is the method used in the bTPA indicator to open trades, but it uses a hot key to close the trades. If you want to do things like move stops, targets, partial exits, cancel orders, etc. those methods are only available in strategies.

I interface my indicator with my strategy using the windows clipboard. When I press the 'BE' button on my chart, the indicator puts the following command on the windows clipboard '<NTcmd> BreakEven </NTcmd>' using Clipboard.SetText(). My strategy reads the windows clipboard using Clipboard.GetText(), sees the 'BreakEven' command, and executes SetStopLoss(...). I have many other specialized button commands implemented such as 'BuyCloseOfBar', 'SetTarget+1RMultiple', 'SetStop-1', 'TrailBy2Bars', 'TrailDownBars', 'PauseStrategy', 'BreakEven', 'ExitHalf', etc. You can only implement these types of functionality with strategies, and your code will be supported by NinjaTrader.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Deepmoney LLM
Elite Quantitative GenAI/LLM
Are there any eval firms that allow you to sink to your …
Traders Hideout
Futures True Range Report
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
36 thanks
NexusFi site changelog and issues/problem reporting
25 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #22 (permalink)
 fosch 
Bethesda, Maryland
 
Experience: Intermediate
Platform: NinjaTrader
Trading: stocks
Posts: 5 since May 2011
Thanks Given: 36
Thanks Received: 2


monpere View Post
Check out the ChartButtons indicator in the download section as an alternative. I use it exclusively, and can use it with or without chart trader visible or enabled, and no need to alter NinjaTrader internal code.

Thanks monpere.

I couldn't locate the ChartButtons indicator in the download section? Were you referring to Ninja's forum, or the forum with Big Mike's? I looked at Big Mike's, but could not locate it under /Indicators, /Strategies, or /Misc?

You would posible provide the link... thanks.

fosch

Reply With Quote
  #23 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371



fosch View Post
Thanks monpere.

I couldn't locate the ChartButtons indicator in the download section? Were you referring to Ninja's forum, or the forum with Big Mike's? I looked at Big Mike's, but could not locate it under /Indicators, /Strategies, or /Misc?

You would posible provide the link... thanks.

fosch


Reply With Quote
Thanked by:
  #24 (permalink)
 futuretrader 
Como Italy
 
Experience: Intermediate
Platform: Ninjatrader, customized
Trading: ES
Posts: 525 since Feb 2010
Thanks Given: 471
Thanks Received: 643

@monpere,

You mention having the ability to enable ChartTrader while running the strategy. Whenever I close a position with ChartTrader it disables whatever strategy has initiated the order. Do you have a way to avoid this?

Thanks.

Reply With Quote
  #25 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371


futuretrader View Post
@monpere,

You mention having the ability to enable ChartTrader while running the strategy. Whenever I close a position with ChartTrader it disables whatever strategy has initiated the order. Do you have a way to avoid this?

Thanks.

That is true. Closing a position with a charttrader close button will terminate the strategy. I don't think you can avoid it. I generally close trades manually by moving the target order on the chart, in which case, the strategy will not terminate.

Reply With Quote
  #26 (permalink)
 futuretrader 
Como Italy
 
Experience: Intermediate
Platform: Ninjatrader, customized
Trading: ES
Posts: 525 since Feb 2010
Thanks Given: 471
Thanks Received: 643

Thanks for the response - that's what I've been doing too; I was just hoping you might have found a loophole....

Reply With Quote
  #27 (permalink)
 
ThatManFromTexas's Avatar
 ThatManFromTexas 
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
Posts: 2,265 since Feb 2010
Thanks Given: 1,206
Thanks Received: 4,348


futuretrader View Post
@monpere,

You mention having the ability to enable ChartTrader while running the strategy. Whenever I close a position with ChartTrader it disables whatever strategy has initiated the order. Do you have a way to avoid this?

Thanks.


monpere View Post
That is true. Closing a position with a charttrader close button will terminate the strategy. I don't think you can avoid it. I generally close trades manually by moving the target order on the chart, in which case, the strategy will not terminate.

@futuretrader

@monpere

I created an indicator that (1) Creates the Buttons on the Chart Trader (2) Calls a strategy that generates a buy or sell order (3) Calls an ATM strategy to handle the stops and targets

Pressing the Buy or Sell Buttons on the chart trader causes the indicator to pass that information to the strategy which issues the orders and invokes the ATM strategy to handle the stops and targets.

Once the orders are generated, the stops and targets can be moved without affecting the strategy.

The Close Button on the Chart Trader closes all orders but doesn't affect the strategy since it is invoked by an indicator running on the same chart as the Chart Trader.

Hope that helps.


I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
Thanked by:
  #28 (permalink)
 
monpere's Avatar
 monpere 
Bala, PA, USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,371


ThatManFromTexas View Post
@futuretrader

@monpere

I created an indicator that (1) Creates the Buttons on the Chart Trader (2) Calls a strategy that generates a buy or sell order (3) Calls an ATM strategy to handle the stops and targets

Pressing the Buy or Sell Buttons on the chart trader causes the indicator to pass that information to the strategy which issues the orders and invokes the ATM strategy to handle the stops and targets.

Once the orders are generated, the stops and targets can be moved without affecting the strategy.

The Close Button on the Chart Trader closes all orders but doesn't affect the strategy since it is invoked by an indicator running on the same chart as the Chart Trader.

Hope that helps.

Attachment 63433

Is the close button on the chart trader the default close button from NT, or is it a button that you created in the chart trader, that tells the strategy to close the trade?

Reply With Quote
  #29 (permalink)
 
lolu's Avatar
 lolu 
Lagos, Nigeria
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader, SierraChart
Trading: Euro Currency & Oil
Frequency: Daily
Duration: Hours
Posts: 2,552 since Jun 2009
Thanks Given: 1,049
Thanks Received: 1,678


ThatManFromTexas View Post
@futuretrader

@monpere

I created an indicator that (1) Creates the Buttons on the Chart Trader (2) Calls a strategy that generates a buy or sell order (3) Calls an ATM strategy to handle the stops and targets

Pressing the Buy or Sell Buttons on the chart trader causes the indicator to pass that information to the strategy which issues the orders and invokes the ATM strategy to handle the stops and targets.

Once the orders are generated, the stops and targets can be moved without affecting the strategy.

The Close Button on the Chart Trader closes all orders but doesn't affect the strategy since it is invoked by an indicator running on the same chart as the Chart Trader.

Hope that helps.

Attachment 63433

@ TMFT,

Have you read through this thread ? It may be of interest and maybe you can suggest (NOT code 'cos of your Med's advice) some codes that can take the bPTA indicator to a new level. I particularly initially had a challenge on the Close button implementation of bPTA 'cos the NT/Windows keyboard mapping setup does not conform with the keyboard combinations on my Mac machine, but I eventually got over it. Have a look @ my post here.

Lolu

Visit my NexusFi Trade Journal Reply With Quote
  #30 (permalink)
 futuretrader 
Como Italy
 
Experience: Intermediate
Platform: Ninjatrader, customized
Trading: ES
Posts: 525 since Feb 2010
Thanks Given: 471
Thanks Received: 643



ThatManFromTexas View Post
@futuretrader

@monpere

I created an indicator that (1) Creates the Buttons on the Chart Trader (2) Calls a strategy that generates a buy or sell order (3) Calls an ATM strategy to handle the stops and targets

Pressing the Buy or Sell Buttons on the chart trader causes the indicator to pass that information to the strategy which issues the orders and invokes the ATM strategy to handle the stops and targets.

Once the orders are generated, the stops and targets can be moved without affecting the strategy.

The Close Button on the Chart Trader closes all orders but doesn't affect the strategy since it is invoked by an indicator running on the same chart as the Chart Trader.

Hope that helps.

@TMFT,

I have the same question as monpere regarding the Close button. Also, are you using monpere's method of passing orders to a strategy via the clipboard, or something else?

The other approach I'd thought of is to rework the ChartTrader itself and invoke the eventhandlers associated with its buttons to submit orders. But that would limit the order types to Buy Market, Buy Bid etc.

Reply With Quote




Last Updated on February 25, 2014


© 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