NexusFi: Find Your Edge


Home Menu

 





Working on profit-loss ratio


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one cclsys with 25 posts (16 thanks)
    2. looks_two Jugador with 7 posts (1 thanks)
    3. looks_3 max-td with 3 posts (1 thanks)
    4. looks_4 sam028 with 2 posts (0 thanks)
    1. trending_up 15,101 views
    2. thumb_up 18 thanks given
    3. group 5 followers
    1. forum 39 posts
    2. attach_file 28 attachments




 
Search this Thread

Working on profit-loss ratio

  #11 (permalink)
 
cclsys's Avatar
 cclsys 
Sydney, NS
 
Experience: Intermediate
Platform: Ninja
Broker: Zen-Fire
Trading: TF,S,GC
Posts: 605 since Nov 2009
Thanks Given: 248
Thanks Received: 393


Jugador View Post
Sorry...my bad. Usually, when someones talking "options" I tend to correlate "short" with "write", and long positions as "buy" calls or "buy" puts.

But, if I was thinking!...obviously, if you had sold $65,000 worth of puts just before the crash, you would have had to sell your house!

No, you are right, that was 'my bad'! I should have written that I was short the market with puts versus short puts. If I HAD been short puts, I would have had to SELL a house!

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
About a successful futures trader who didnt know anythin …
Psychology and Money Management
What broker to use for trading palladium futures
Commodities
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
 
  #12 (permalink)
Jugador
USA
 
Posts: 162 since Jul 2009
Thanks Given: 67
Thanks Received: 51


cclsys View Post
Am curious: what sort of stops - PT's are you dealing with in your 1-3 method and which sort of timeframes?


5 tick stop...16 tick PT (1 extra tick to cover commissions). Today I used a 5 range bar chart on ES emini.

Reply With Quote
  #13 (permalink)
 
cclsys's Avatar
 cclsys 
Sydney, NS
 
Experience: Intermediate
Platform: Ninja
Broker: Zen-Fire
Trading: TF,S,GC
Posts: 605 since Nov 2009
Thanks Given: 248
Thanks Received: 393



Jugador View Post
5 tick stop...16 tick PT (1 extra tick to cover commissions). Today I used a 5 range bar chart on ES emini.

Thanks. I have been tending to work with markets with around a 10 tick stop, so going for 30 is a bit hard. But then I also didn't research 3-1 as an option. It makes a lot of sense. Tight stop so either you are right and catch a move, or you are wrong and take a small loss.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #14 (permalink)
Jugador
USA
 
Posts: 162 since Jul 2009
Thanks Given: 67
Thanks Received: 51


cclsys View Post
It makes a lot of sense. Tight stop so either you are right and catch a move, or you are wrong and take a small loss.

Yeah, and so I don't get myself into too much trouble, I stop for the day if I'm down about 2% of my account.

So, with a $25,000 account, if I'm stopped out about 8 times ($500), then I'm done for the day.

If I get stopped out 8 times before I catch a couple of winners, it's probably a good idea to stop anyway!

Reply With Quote
  #15 (permalink)
 
cclsys's Avatar
 cclsys 
Sydney, NS
 
Experience: Intermediate
Platform: Ninja
Broker: Zen-Fire
Trading: TF,S,GC
Posts: 605 since Nov 2009
Thanks Given: 248
Thanks Received: 393

Just having started this thread is giving me ideas, although I am not sure how to implement them.

The sense vaguely forming is to start from the money management and build from there versus applying MM to entries (mainly) and exits, i.e. trying to find good entry conditions. Obviously that is important but....

It is quite simple to calculate risk-reward with single units in the sense that whether or not you are trading single or multiple lots they all enter and exit at the same price. It is another thing to figure out good scaling approaches. I suspect this cannot be done without extensive work in terms of recording the MFE on any position (assuming you never exited it until after the MFE happened).

Although I know that scaling works in terms of increasing odds of consistent profitability, I suspect that building on single unit risk-reward is still fine for analysis. Still, there is a BIG difference between going all-in and all-out and then scaling. For example, with your 3-1 approach and assuming 3 units per position:

If your first target is 3* the loss, fine, the rest is gravy.
But if the stop is -5 and Tgt 1 is +6 with BE's at that point, it gets very hard to simply calculate what's going on there risk reward wise.

In any case, this thread has helped me zero in already on realising that I have not approached day trading with the analytical rigor in terms of money management which it deserves and requires. I kept thinking that because I was only trying to scalp quickie moves that all that mattered was coming up with a hot sh*t entry method.

Also, soon after I started Tradestation closed down many Canadian accounts one day out of the blue without warning so I moved to Ninja in which I cannot program and do such analysis easily. That sure hasn't helped!

I have never approached long term design that way in terms of stellar entries. For example, my portfolio system uses a simple moving average with one condition to trade 30 commodities (or more), plus custom-programmed seasonals which are also essentially very simple. That's it. But catching long term trends more than makes up for the stop losses and is, fundamentally, quite easy to do if you have the patience and the funds to do it (which I don't).

My problem now, it seems, is that I don't have the coding ability in Ninja to test entries and find their MFE and MAE from which to analyse scaling versus single unit approaches so I am left with very simple stop and profit target only analysis assuming single units. But at least that's a start to drill down into it.

I suspect I will be spending some time in Market Replay to build up some stats, esp. MFE and MAE. But to make that meaningful I have to clearly set up different types of signals as separate strategies, get very clear on the rules so that when the results are published into a SS they are meaningful.

In terms of this thread, though, the only thing that makes sense is still to shoot for a strategy that can be back-tested in order to get the stats but still to structure the strategy rules so that any optimized inputs emphasise the money-management versus the entry aspect, i.e. keep the entry rules always the same, simply study different risk-reward elements. But an indicator alone is not going to be all that helpful it seems.

So now I will work on transferring my simple indicator into a strategy code and then testing it by mainly only optimizing one parameter: the profit-to-loss ratio. Hopefully I can figure out how to code this since the underlying entry rules are so simple.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #16 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


Jugador View Post
Yeah, and so I don't get myself into too much trouble, I stop for the day if I'm down about 2% of my account.

So, with a $25,000 account, if I'm stopped out about 8 times ($500), then I'm done for the day.

If I get stopped out 8 times before I catch a couple of winners, it's probably a good idea to stop anyway!

It's maybe good when you have strong trends, your 16 tick target will be hit, sooner or later.
But in a tight range market ?
Your stops may be hit many times, and you'll never see your target.
To be verified on a chart...

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
  #17 (permalink)
Jugador
USA
 
Posts: 162 since Jul 2009
Thanks Given: 67
Thanks Received: 51


sam028 View Post
It's maybe good when you have strong trends, your 16 tick target will be hit, sooner or later.
But in a tight range market ?
Your stops may be hit many times, and you'll never see your target.
To be verified on a chart...

Yeah, I'd like to use 2 or 3 ticks as my stop, and go for 7 or 10, but I just don't think that's enough wiggle room.

Reply With Quote
  #18 (permalink)
 
cclsys's Avatar
 cclsys 
Sydney, NS
 
Experience: Intermediate
Platform: Ninja
Broker: Zen-Fire
Trading: TF,S,GC
Posts: 605 since Nov 2009
Thanks Given: 248
Thanks Received: 393

Well, as I always find with Ninja, I just spent three hours trying to code in this ridiculously simple system and can't put in stops and profit targets, get it to exit when the new direction sets up etc. etc. etc. etc. etc.

Would take me about 10-15 minutes in Tradestation.

Compiles nearly all the time, so no hints there as to what I am doing wrong. Will just have to spend a few days on their forum to figure out whatever silly, basic thing it is that I am doing wrong with Ninja Lingo.

Sam, are you really in France? I used to live there, first near Blois, then near Limoges, not to mention several stints in Paris. Speak it well, can't write it though.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #19 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


cclsys View Post
Well, as I always find with Ninja, I just spent three hours trying to code in this ridiculously simple system and can't put in stops and profit targets, get it to exit when the new direction sets up etc. etc. etc. etc. etc.

Would take me about 10-15 minutes in Tradestation.

Compiles nearly all the time, so no hints there as to what I am doing wrong. Will just have to spend a few days on their forum to figure out whatever silly, basic thing it is that I am doing wrong with Ninja Lingo.

Sam, are you really in France? I used to live there, first near Blois, then near Limoges, not to mention several stints in Paris. Speak it well, can't write it though.

Easy-Language is made for traders, C# for IT guys...
That's why coding Ninja strategy is not so easy, if you try to do things like your were doing with TS.
The idea is maybe to use a lot of Print("...") , learn how to use IOrder, read the code in some other basic strategy ( like this one), or hire a pro.

You can also post your strategy here, with your entries based on a very basic signal (SMA crossover for ex.), so your hyper-smart entry signal will stay private , and then explain how do you want to manage stops/targets.
When a good simple strategy skeleton is made with these bases, adding more smart things is easy...
Their is so many traps in NT strategies, starting slowly with simple things is a good idea...

Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
  #20 (permalink)
 
cclsys's Avatar
 cclsys 
Sydney, NS
 
Experience: Intermediate
Platform: Ninja
Broker: Zen-Fire
Trading: TF,S,GC
Posts: 605 since Nov 2009
Thanks Given: 248
Thanks Received: 393



sam028 View Post
Easy-Language is made for traders, C# for IT guys...
That's why coding Ninja strategy is not so easy, if you try to do things like your were doing with TS.
The idea is maybe to use a lot of Print("...") , learn how to use IOrder, read the code in some other basic strategy ( like this one), or hire a pro.

You can also post your strategy here, with your entries based on a very basic signal (SMA crossover for ex.), so your hyper-smart entry signal will stay private , and then explain how do you want to manage stops/targets.
When a good simple strategy skeleton is made with these bases, adding more smart things is easy...
Their is so many traps in NT strategies, starting slowly with simple things is a good idea...


There is no hyper smart entry strategy. I am just using the slope of the LinReg line - same as the indicator first uploaded here.

I spent today reconfiguring all ATM strategies to be named according to signal type and profit-loss ratio so that I can begin to build statistics in a SS with MFE MAE etc. and also compare different ratios/scaleouts. I would prefer to do this in backtests via a strategy.

If you or anyone else feels like getting it to work, that would be most appreciated and hopefully helpful for others, which is the intention.

To clarify, the intention behind this strategy is to create something that can quickly test profit-to-loss ratio both trading singles and multiples in order to generate some good statistics for analysis. It's not really about an entry technique at all.

I picked the LinReg because it is both fairly smooth and pretty responsive to swing changes. I would never consider it as a stand alone strategy per se, although I have noticed that combining a longer one as a filter often works quite well as a basis for a simple trend-following approach that does not get whipsawed quite as much as the single line alone. I have not tried to develop daytrading strategies on Ninja and prefer to have a few indicators (less and less, frankly). But the problem is that I have been flying blind without the sort of statistical analysis I was used to on Tradestation, albeit mainly I worked with longer term things when coding. So I guess this project is an attempt to start to drill down into daytrading statistics on some level, which is hard to do manually.

If this doesn't work, I shall have to start building a library of trades by running Market Replay regularly or trading more in SIM after the main trading morning real-time trading session in order to build the data for export. But again: being able to run a simple strategy would be best. And of course once you have the template, it is not hard to change the entry conditions to test different types of signal one at a time to get stats on it.

Code attached for both current (useless) strategy and (slightly more helpful but still useless) indicator.

The current strategy is really a mess because I was putting in several things just to try to figure out what was not working. I don't want it to use stops and PT's based in tick numbers input into a menu. The whole point is to have them relate to each other via variables in terms of a profit-to-loss ratio.

There are two ways to set the initial stop: 1 just keys off the Donchian channel wherever it is when the entry is triggered. That is probably the simplest. So whatever the risk is at that point, the profit target(s) are that risk * the risk-reward ratio ('ratio').

The other method is also simple and it just risks a certain multiple of ATR (periodX) and again the PT's are a multiple of that derived from the risk-reward ratio, and the same for any additional units in terms of scaling.

Hope that makes sense. It seems much simpler to think than to write out! The whole thing is supposed to be very simple, actually, not complicated at all.

Attached Files
Elite Membership required to download: AshTest1.zip
Elite Membership required to download: LRGaussST2.zip
Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on December 1, 2009


© 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