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 aligator with 2 thanks per post
    4. looks_4 monpere with 1.9 thanks per post
    1. trending_up 24,429 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

  #51 (permalink)
 
Sunil P's Avatar
 Sunil P 
los angeles
 
Experience: Intermediate
Platform: nt
Trading: cl
Posts: 290 since Jan 2012

'I will give you a Hmaburger for it TMFT and pay you next Tuesday for it'....Wimpy

Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
About a successful futures trader who didnt know anythin …
Psychology and Money Management
 
  #52 (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,355


sunil patel View Post
'I will give you a Hmaburger for it TMFT and pay you next Tuesday for it'....Wimpy

... you know the Cardiologist won't let me have a hamburger....

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
  #53 (permalink)
 futuretrader 
Como Italy
 
Experience: Intermediate
Platform: Ninjatrader, customized
Trading: ES
Posts: 525 since Feb 2010
Thanks Given: 471
Thanks Received: 643


OK, I'll scratch that idea.

What concerned me most about the other methods is that they all involve unsupported features, which NT could eliminate at any time...not that I don't use lots of other unsupported features.

Reply With Quote
  #54 (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,372


futuretrader View Post
OK, I'll scratch that idea.

What concerned me most about the other methods is that they all involve unsupported features, which NT could eliminate at any time...not that I don't use lots of other unsupported features.

I feel the same way you do. Although I think this approach is pretty cool technically, its un-supportability is the reason I chose not to go that route. If you want a more supportable approach, what I do is start a strategy normally in the command center, and load a normal indicator on my chart as usual, and have the indicator and strategy communicate with each other with a global variable as described in post #31.

That approach has several advantages. First it is fully supported, second, it is simple and straight forward, third, because the indicator is fully de-coupled from the strategy, you have much more flexibility. For instance, you can alter the management of a trade in-flight by sending new commands to the strategy while it is in the middle of a trade, or pause the strategy, etc. Commands to the strategy can come from anywhere at anytime, from the same indicator that started a trade, or any other indicator even from a different chart, or any other strategy. When the trade is over, the strategy is still running, so you have access to strategy aggregated data, that can be used for future trade decisions, etc., etc. I've been using this approach ever since NT6.5.

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

Thanks, monpere, I decided to pursue your method using the global variable.

How do you monitor the 'command' variable in your strategy, via a timer or just checking within one of the update methods?

Reply With Quote
  #56 (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,372


futuretrader View Post
Thanks, monpere, I decided to pursue your method using the global variable.

How do you monitor the 'command' variable in your strategy, via a timer or just checking within one of the update methods?

I check in OnMarketData(), and I have a 1 second timer check.

Reply With Quote
Thanked by:
  #57 (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


monpere View Post
I feel the same way you do. Although I think this approach is pretty cool technically, its un-supportability is the reason I chose not to go that route. If you want a more supportable approach, what I do is start a strategy normally in the command center, and load a normal indicator on my chart as usual, and have the indicator and strategy communicate with each other with a global variable as described in post #31.

That approach has several advantages. First it is fully supported, second, it is simple and straight forward, third, because the indicator is fully de-coupled from the strategy, you have much more flexibility. For instance, you can alter the management of a trade in-flight by sending new commands to the strategy while it is in the middle of a trade, or pause the strategy, etc. Commands to the strategy can come from anywhere at anytime, from the same indicator that started a trade, or any other indicator even from a different chart, or any other strategy. When the trade is over, the strategy is still running, so you have access to strategy aggregated data, that can be used for future trade decisions, etc., etc. I've been using this approach ever since NT6.5.

Mon,

I need to see typical setup codes for the Strategy that is triggered by an indicator ... there is none posted on futures.io (formerly BMT) (Or is there any ?) ... we already have a typical indicator posted in this regard, but the indicator does not contain codes that call a Strategy. Could we have a typical indicator/Strategy setup/codes scenario that we can build on ?

Lolu

Visit my NexusFi Trade Journal Reply With Quote
  #58 (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,372


lolu View Post
Mon,

I need to see typical setup codes for the Strategy that is triggered by an indicator ... there is none posted on futures.io (formerly BMT) (Or is there any ?) ... we already have a typical indicator posted in this regard, but the indicator does not contain codes that call a Strategy. Could we have a typical indicator/Strategy setup/codes scenario that we can build on ?

Lolu

My indicator and strategy have a lot of customized code for my particular style of trading, but a simple case would look like this:

 
Code
//###
//### Strategy
//###
public class TradeManager_Global {
    public static string command = "";
}

namespace NinjaTrader.Strategy
{
...
    protected override void OnBarUpdate() {
        if ( TradeManager_Global.command.Contains("Buy") ) {
            EnterLong();
            TradeManager_Global.command = "";
        }
...
    }
}
 
Code
//###
//### Indicator
//###
protected override void OnBarUpdate() {
   ...
   if ( buyButtonPressed ) TradeManager_Global.command = "Buy";
   ...
}
Some of my commands may look like the following depending on what buttons I press etc.:

<ATMmgrCmd>CL 04-12, BuyNextBarRange 1 ATM_'FUT 5R_LOCAL'</ATMmgr>"

which says buy 1 CL contact at the close of the next range bar using the "FUT 5R_LOCAL" NT ATM Strategy.

<ATMmgrCmd>CL 04-12, BuyMarket 1 +10-5 @5:-3 @7:-2 @8:+1 @9:+5>

which means: Buy 1 CL contract at Market, Target 10 ticks (+10), Stop 5 Ticks (-5), At 5 Ticks in the profit move stop to 3 ticks behind my entry (@5:-3), at 7 ticks in profit move stop to 2 ticks behind the entry (@7:-2), at 8 Ticks in profit move stop to break even +1 (@8:+1), at 9 ticks in profit move stop to entry +5 ticks (@9:+5), etc. With this format, the strategy can duplicate the NT ATM's, but have unlimited number of steps, and unlimited flexibility. I put the string "+10-5=8 @5:-3 @7:-2 @8:+1 @9:+5" in an indicator parameter, and pass it along with the command when I need a flexible ATM. You can customize everything else as you wish, of course you have to write the code to parse and execute the commands.

Reply With Quote
Thanked by:
  #59 (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


monpere View Post
My indicator and strategy have a lot of customized code for my particular style of trading, but a simple case would look like this:

 
Code
//###
//### Strategy
//###
public class TradeManager_Global {
    public static string command = "";
}

namespace NinjaTrader.Strategy
{
...
    protected override void OnBarUpdate() {
        if ( TradeManager_Global.command.Contains("Buy") ) {
            EnterLong();
            TradeManager_Global.command = "";
        }
...
    }
}
 
Code
//###
//### Indicator
//###
protected override void OnBarUpdate() {
   ...
   if ( buyButtonPressed ) TradeManager_Global.command = "Buy";
   ...
}
Some of my commands may look like the following depending on what buttons I press etc.:

<ATMmgrCmd>CL 04-12, BuyNextBarRange 1 ATM_'FUT 5R_LOCAL'</ATMmgr>"

which says buy 1 CL contact at the close of the next range bar using the "FUT 5R_LOCAL" NT ATM Strategy.

<ATMmgrCmd>CL 04-12, BuyMarket 1 +10-5 @5:-3 @7:-2 @8:+1 @9:+5>

which means: Buy 1 CL contract at Market, Target 10 ticks (+10), Stop 5 Ticks (-5), At 5 Ticks in the profit move stop to 3 ticks behind my entry (@5:-3), at 7 ticks in profit move stop to 2 ticks behind the entry (@7:-2), at 8 Ticks in profit move stop to break even +1 (@8:+1), at 9 ticks in profit move stop to entry +5 ticks (@9:+5), etc. With this format, the strategy can duplicate the NT ATM's, but have unlimited number of steps, and unlimited flexibility. I put the string "+10-5=8 @5:-3 @7:-2 @8:+1 @9:+5" in an indicator parameter, and pass it along with the command when I need a flexible ATM. You can customize everything else as you wish, of course you have to write the code to parse and execute the commands.

Mon,

See my question in the attached screenshot (just getting to understand your concepts ... I want to immediately start to create a setup).

Lolu


Visit my NexusFi Trade Journal Reply With Quote
  #60 (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,372



lolu View Post
Mon,

See my question in the attached screenshot (just getting to understand your concepts ... I want to immediately start to create a setup).

Lolu


The specialized command goes in the indicator OnBarUpdate() code. The strategy is only reading that command, and resetting it after it has read and processed it.

 
Code
//###
//### Indicator
//###
protected override void OnBarUpdate() {
   ...
   if ( buyButtonPressed ) TradeManager_Global.command = "BuyNextBarRange 1 ATM_'FUT 5R_LOCAL'";
   ...
}

Reply With Quote
Thanked by:




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