top of page

Price Weighting

Price Weighting (PW) is a NinjaTrader strategy (what MT4 calls Expert Advisors) for automating and supporting the way I trade futures.  PW will NOT take any trades automatically.  You have to use the tool to enter your own trades.  PW will help you visualize and plan, and set certain automation behaviors such as the trailing stop mechanics (which is what the name "price weighting" refers to).  This is not my own methodology, it is an implementation of Casper SMC's trailing stop method, please see Smart Trading Blueprint for more information on this.  

​

Important Note: PW does NOT support changing the chart timeframe. 

Version 1.0.3.8

Updated Jan 30, 2025

Order Management

This is where you enter and exit positions.  Because of the way coding works in NinjaTrader, you can NOT use the Chart Trader panel to manage your entries.  NT strategies can ONLY work with orders that were created by the strategy itself.  You should still set the same account in Chart Trader so you can see PW's trades on your chart, just don't use the Chart Trader controls for doing anything with actual trades.  Use the Risk Management section (see below) to set the number of contracts and risk (which controls where the SL goes).  The Risk Text (shown below the SELL/BUY buttons) explains the risk involved with your current settings: # contracts, distance in ticks, risk%.

If the timer is running the remaining duration is shown on the button; otherwise it just says "(locked)".  Once you've started the timer there's no way to re-enable trading until the timer expires.  If you struggle with over-trading this a great way to impose some discipline.  (You can, however, just remove the strategy from the chart and re-add it to circumvent this; the running timer does not persist through reinitialization.)

The LOCK OUT feature lets you disable entries, so you don't accidentally get into a new position.  You can specify how long the lock lasts, or leave the duration at zeros and it will just lock with no timer.  If the timer is running you can't unlock until the timer expires.

When you're in an active position the buttons change to a CLOSE button, which will flatten your position (close all orders and cancel all pending orders).  You also have the option to scale in and out.  Use the "Contracts" input in the Risk Management section to set the number of contracts (see below), and the [-1] and [+1] buttons to remove and add this number of contracts to your position.  If the number of contracts is the same as or greater than the number of contracts in the active position then the [-1] button is disabled, as that would just close the whole position. NOTE: This also respects the "Entries per direction" input under Order handling; the [+1] button will be disabled if you're already at your maximum number of entries.

If you have integration with the Position Tool indicator set up (see below) then when you add contracts to a position the PT's display of its SL rect (representing your risk) will change its size to keep the same amount of risk displayed.  And if you remove contracts the SL rect will keep its same size, but will reflect the lower amount of risk.  We do this because we do not want to increase risk when adding contracts; and we do not want to move the SL farther away when removing contracts.  But note, this is just a visualization, this is actually not affecting things like your SL order or where your TPs are, you still manage those manually.  If you're choosing to scale in and out of positions then you're actively managing your position anyway.

Risk Management

This is where you set your contracts and risk.  The risk you want to use controls where your SL will be placed.  The 0.25/0.5/1.0 buttons to the right of the Risk% input are shortcut buttons to quickly set these risk% values.  You can see the distance (in ticks) shown in the Risk Text in the Order Management section (see above); and if you have PT integration setup then PT will show you where this SL will be on the chart (see below).

The account you selected in the inputs is displayed here as well, as a reminder.  If this is not the Sim account (e.g. Sim101) then the account name will be obfuscated to hide the account number (you can see this in the image at the top of this page); but you can click it to toggle this on/off.

NT_PW6.png

This next bit is a little confusing.  PW is NOT using TP orders to close trades at targets.  There are technical reasons for this.  You can set two TPs here based on the RR (it will calculate based on the risk%) and when the position is active it will draw a line on the chart for each.  You can modify the TPs by either changing their RR in the dialog, or by dragging the line on the chart.  
TP1 Contracts must be equal to or less than the number of contracts in the position.  If TP1 Contracts is < Contracts (i.e., after TP1 is hit there are still contracts in the active position) then TP2 will close all remaining contracts.  
If you use an invalid RR value then that TP will be disabled and the text will be shown in red until you adjust the RR value to something valid.

If your Risk% would exceed your daily loss % (see Targets, below) then the risk % and label are shown in red.  This also takes into account your realized P&L for the day.  For instance, if your daily loss % is 0.5% and you've already lost 0.3%, then a trade at 0.2% or higher would be shown in red.  You can still take the trade of course, it's just warning you that you would be at risk of exceeding your daily limit if the trade were to hit its SL.

The Reset button returns all settings to their values as set in the inputs (across all sections of PW, not just Risk Management).  This has no effect on any active positions, though it would affect TP1, TP2 and the trailing stop settings.

NT_PW8.png

Position Tool

PW supports integration with the Position Tool indicator (PT).  You must have this installed already when you add PW to your chart.  PW requires PT 2.0.0.2 or higher to work.  If you don't have PT installed then the Position Tool panel is not displayed in the PW UI. (Download PT from the NinjaTrader freebies page.) [UPDATE: I now see it might be the case that you get PW automatically with PT, but I'm not sure and this is not easy for me to test.  If anyone downloads PW without installing PT first, and you still get the PT functionality working inside of PW, please let me know!]
 

If you have PT installed, though, PW will use it to visualize your planned trade using the settings in Risk Management and the Position Tool panel.  Click the LONG/SHORT buttons to turn on/off the display of PT with current settings.  Enable "Follow Current Price" to have PT move on every price change so its entry price matches current price.  Otherwise it updates its position on every new candle.  Use Offset to set how many bars ahead of the current bar to display PT; and Width to set how many bars wide PT will be drawn.  You can have it show the distance to its SL and TP in points or ticks, or not at all.

NT_PW9.png

The Risk/Reward ratio used to determine the size of PT's SL rect has NOTHING to do with the TP1/TP2 settings in the Risk Management section.  They operate completely independently.  PT will show you where the SL order will be placed if you enter this position.  If you then drag the SL order, or if the SL changes due to the Trailing Stop features, the PT display will NOT update its SL rect size to adjust.  It will always show the original size of the SL region.  The only exception to this is if you scale into a position by adding contracts; then the SL rect size will reduce to display the same amount of risk.

When you enter a position from the Order Management panel, PT will be updated to where the position entry occurs.  Follow mode will be turned off.  The Offset/Width inputs are disabled; the rect will no longer follow price.  You can still turn PT on/off using the LONG/SHORT buttons, but it will stay in the same place as long as this position is active.  If you get to the right edge of the PT window, it will begin to expand to keep its right edge on the current bar.

Once the trade is closed for any reason, the PT window will remain visible but will no longer be updated, until you either turn it off or enter a new position.  The size is adjusted to show your gain or loss for where the trade closed.

Next to the PT Risk/Reward Ratio input is a little button.  It starts with a reticule (⌖).  Click the button, then click on the chart to select the price on the chart where you want the PT TP to be set.  This locks the TP price, and the icon on the button is changed to a lock.  Click it again to unlock the TP price.  (This has NOTHING to do with TP1/TP2!)

​

Normally when you're displaying PT the TP rect is a fixed size, which means that as price moves, the TP rect just follows around with the same RR.  However, when you've locked the TP price, as price moves the TP price stays the same and the size of the TP rect changes.  This also means the RR is changing, which is updated both in the UI (the RR box) and in PT itself.  You can even do this when you have an active position, but in this case the rects aren't moving anymore; but you might want to have PT reflect a target that you actually reaching for, and see what the RR would be.

Trailing Stop / Price Weighting

The specific trailing stop method used here is the reason I started writing this tool in the first place.  
 

First of all we have a RR value at which we will automatically move SL to BE.  You can drag this line around on the chart as well.

​

The Trail RR is the price at which we will begin the trailing logic.  Again, you can drag this to where you want.  If either of these values is not valid the inputs will be disabled and the lines removed until you provide a valid RR value.

So how does this work?  This is a price-action based trailing stop.  When you reach the Begin Trail line, the SL will be moved and the Begin Trail line hidden.  If you're in a BUY then the SL is moved to either the low of the current candle or the previous candle, whichever is farther.  If you're in a SELL then the SL is moved to either the high of the current candle or the previous candle, whichever is farther.  

​

Now, you're waiting for either the SL to be hit (which should be pretty close now), or for a new swing high/low to form.  So if you're in a BUY, when price next forms a Swing High, that SH becomes the new Target price.  The target line is shown again, this time with the "Next Target" label.  If you're in a SELL you're looking for a Swing Low, and when it forms that's the Next Target at a lower price.

​

If price exceeds this target line, then we move the SL again, the same as before.  The farthest between the current candle and previous candle's low/high; and hide the target line.  And again, we're now waiting for either a new Swing High or Swing Low, or to hit the SL.  When the "Next Target" line is displayed you can drag it as before, but it's usually best to just leave it alone and let the price action play out.  

Targets

Wouldn't you like to see where your current risk and trade settings would reach certain levels on your chart?  These are the four levels we show:

​

  • Daily Goal % - The price where you'd hit this goal today

  • Daily Loss % - The price where you'd lose this amount today

  • Drawdown Limit $ - This is made for prop firms with trailing DD.  How much as a $$ amount can you lose before you hit the account's DD limit?  E.g., with a $50k Apex account you have 5% trailing drawdown, which means $2500.  As you enter and exit trades this value changes; it's based on your highest equity, not your balance.  In your Tradovate or Rhithmic account you can see how much you have left before you reach your limit, so put this value here to see where that is on your chart.  This is NOT updated automatically as price moves while you're in a trade.

  • Equity Target $ - The price at which you reach your overall goal.​

Also, if you have recorded a loss on the day then you'll see a Breakeven line, showing where price would need to get for your current position in order to bring your account back into profit.  Often I will use this line as where I move my SL to after we've had a decent move, so that if we get a pullback I will never give back more than what I need to bring me back to even on the day.  

When you are visualizing a planned trade with PT, if you have Targets configured these lines will be displayed on your chart.  

​

When you're in an active position (whether you have PT available or not), you will see these lines on your chart as well.

​

These values also take into account any realized P&L for the day.

​

Knowledge is power.  

Input Properties

Price Weighting

Initial / Reset values for the trailing stop logic.

Style

Bull/Bear color used for buttons in the UI and objects on the chart.  Font and size used for text objects on the chart.

Targets

Your Targets inputs, values and colors.

Trade Parameters

The same as what's shown in the UI and discussed above.  But also, an End Time and Auto-Close option.  Some props (like Apex) do not allow you to keep trades open overnight.  This will automatically close all open positions at the specified time, no matter what.  If you specify a time then a vertical line will be shown on your chart so you can be aware of it.  Time is based on your chart time, no funny business with broker times, time zones etc.

Setup

This is normal NT Strategy stuff.  The main thing here is to select the account you want to use and to check the "Enabled" box (which you have to do every time).

  • MultiMAX Telegram Group
  • YouTube

Trading CFDs and FX is high risk and not suitable for all investors. Losses can exceed your initial investment. Any Information or advice contained on this website is general in nature and has been prepared without taking into account your objectives, financial situation, or needs. You should never trade any capital that you cannot afford to lose.  The author of this website is not responsible for any losses you incur, even if you're using tools obtained from this author, or trading based on information provided from this website, related websites and accounts (e.g. YouTube) or from the author directly.

​

The information on this website is not intended to be an inducement, offer, or solicitation to any person in any country or jurisdiction where such distribution or use would be contrary to local law or regulation.

 

Copyright © 2024 by ChartLogic EA.

bottom of page