NexusFi: Find Your Edge


Home Menu

 





Setting up a strategy: confused with all the methods


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Trader.Jon with 7 posts (2 thanks)
    2. looks_two wown with 5 posts (0 thanks)
    3. looks_3 baruchs with 4 posts (1 thanks)
    4. looks_4 bnichols with 1 posts (0 thanks)
    1. trending_up 5,656 views
    2. thumb_up 3 thanks given
    3. group 4 followers
    1. forum 17 posts
    2. attach_file 0 attachments




 
Search this Thread

Setting up a strategy: confused with all the methods

  #11 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


baruchs View Post
Hi TJ,
...If you read my thread and saw my excel sheet, I told that the results are not correct. They were not correct because that test was on currency pairs, but done only on last (bid) price. When I added the ask price series the results were much worse. I hope you took this into your consideration.

baruchs,

Honestly, I have not given that a great deal of consideration. The spread between Bid / Ask on EURUSD is small enough IMHO that calculating it into an automated strategy is non-beneficial.

What I see as the 'time to fill' (chart closes bar >> calculates that there is an entry >> sends order entrylonglimit (ask, closes, last, whatever) on a fast market overcomes any tests that were done in hindsight. Even a 3 pip margin added to an ask(0) or closes[0][0] target price can leave it unfilled on the next bar, regardless of which direction OR directions the next bar went. I have seen that often in the unregulated currency markets.

If you can get your orders filled 100% of the time at the price you want, immediately, I would certainly appreciate the sharing of that knowledge (ie HOW do you do it?). My best 'hat eating' guess would be that the fill success rate on the next bar for the exact price targeted will be somewhat closer to 35-50% than it is to 65-70%.

Regards,
Jon

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Increase in trading performance by 75%
The Elite Circle
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
My NQ Trading Journal
12 thanks
  #12 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


baruchs View Post
Hi TJ,
...
Now lets check multi target approach in this sense. Lets do it with only 2 targets. I'm certain that you'll be able to extrapolate it to 3, 4 or 10 targets.
The possible outcomes of strategy with 2 targets:
1. Bigger target is met - then smaller is met too. Correlation 1.
2. Smaller target is not met (hit the stop) - bigger target is not met too. Correlation 1.
3. Smaller target is met, stop is moved to BE and second target not met. Correlation 0.
So you see in this approach the outcome correlation is too high. It is still smaller than 1. So go ahead and trade it.
.

In my strategy, adjusted for 2 targets, :: smaller target not met (exited via conditional rule set) - bigger target not met either but is closed out at a higher price via the trailing rules conditions. OR it could be hitting its maximal target. There is no BE stop.

What is the correlation with the scenario? Would you trade it?

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote
  #13 (permalink)
 baruchs 
Israel
 
Experience: Intermediate
Platform: NinjaTrader
Broker: pfg
Trading: eminis
Posts: 323 since Jun 2009


Tj,
I'm sorry its not you its me, but I don't understand your points.

Quoting 
In my strategy, adjusted for 2 targets, :: smaller target not met (exited via conditional rule set) - bigger target not met either but is closed out at a higher price via the trailing rules conditions. OR it could be hitting its maximal target. There is no BE stop.

What is the correlation with the scenario? Would you trade it?

Do you want me to guess? You can just dump the trades into excel and apply a correlation function.
My point is that it will be much bigger than with 2 strategies or the same strategy on 2 instruments.
If you think its good for you then trade it no question.

Quoting 
If you can get your orders filled 100% of the time at the price you want, immediately, I would certainly appreciate the sharing of that knowledge (ie HOW do you do it?). My best 'hat eating' guess would be that the fill success rate on the next bar for the exact price targeted will be somewhat closer to 35-50% than it is to 65-70%.

Again whats your point?
I would not bother with coding strategies if its not possible to backtest them with at least 90% accuracy to live.
On one hand you say bid/ask backtesting is not important and on the other that your accuracy is below 50%.

Baruch

Reply With Quote
  #14 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184

Baruch,

I have never had a 'handle' on Excel or Lotus123 or any other spreadsheet ... just too much to learn already in NT ... so I am just using what I can with NT, including studying the charts after backtests and optimizations and my written notebooks. Definitely limiting, and does have a an actual calming effect on not having extremely too much information.

No, I think it is me, so I will try to rephrase. I have a sincere admiration for any trader that can get fills on their orders at the price they want, WHEN they want. I dont see it happening like it should in SIM, and it was never happened above about 65% of the time in my live trades (NQ, YM, ES, 6E). I am not talking about stops or targets, I am speaking to filling the order.

I currently run the automated strategy (COBC=true) in SIM, EURUSD on MB Trading and Dukascopy, and the orders are placed and marked by the strategy, ie EnterLongLimit true,Closes[0][0] + (2 or 3) ticks, and often (lets say 50% of time) I can watch the bar move up and down around the target price with never getting a fill. I didnt design to 'chase' the price on a long if it moves up unless the strategy still gives a buy signal on a subsequent bar: this doesnt happen very often unless the market is choppy: I still have to add code to exit the order if not filled in two bars. IF the order filled on the entry bar at a target price as calculated, 65% of time it is profitable. Looking at those trigger marks on the chart, I surmise that 65% of them would have been profiatble as well, if they had been filled.

>>>>>>>>>>>>>> So, what is the 'tool' needed in the strategy to get GOOD fills? I dont want to use market orders as they more often than not get a fill price beyond my initial target, actually getting me into loss mode, and it is psychologically troublesome when I see that happen. <<<<<<<<<<<<

Today I made a decision to revamp my strategy innards to get everything working/calculation based solely on BIP=0 and the indicators are modified to work on the the different BIPs internally within the indicator itself. I am moving from BIP=0 5 Better Renko to somewhere between 1 and 3 ticks bar. I am anticipating/hoping this will giving me the same overall results that the original strategy did, as I use only 3 different indicators in entry conditions and 4 in the trailing/exit codes.

Feedback is appreciated,
Jon

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote
Thanked by:
  #15 (permalink)
wown
Boston
 
Posts: 21 since Nov 2010
Thanks Given: 0
Thanks Received: 17

well, lol, it seems we have drifted off topic a bit. All interesting stuff though.

anyway, I think I now understand what baruch was getting at on how to set up the strategies.

however, going back to my original question: what is the code/structure for setting up strategies. disregard the fact that this may be the worst strategy ever designed. my programming knowledge is very limited and I just want to learn the code so i can start at least developing the strategies.

but having done some research i think this is what i have to do (and for sake of simplicity, lets say I have 2 profit targets and 1 stop loss. Each profit target to take 1 /ES contract for example.):

define 2 strategies and trade them at the same time.
strat 1: profit target 1 and stop loss trades 1 /ES.
strat 2: profit target 2 trade 1 /ES. initial stop loss is at the original stop loss. when the price has moved up to strat 1's profit target, move the stop loss to that profit target or BE or whatever.

so, how do i code that?

Reply With Quote
  #16 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


wown View Post
well, lol, it seems we have drifted off topic a bit. All interesting stuff though.

anyway, I think I now understand what baruch was getting at on how to set up the strategies.

however, going back to my original question: what is the code/structure for setting up strategies. disregard the fact that this may be the worst strategy ever designed. my programming knowledge is very limited and I just want to learn the code so i can start at least developing the strategies. ...so, how do i code that?

wown,

Writing code is an adventure in itself ... have you had a look at the strategies that are available for download here on nexusfi.com (formerly BMT) and also the NT forums?
Links and Downloads Manager - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum


Study the code in the strategys for a day or two and you will start to get an idea of the sequence and what the structure is. F1 help isnt luxurious with example code but it is useful to get a feeling what each part of the code does when you see it in a completed strategy.

Let us know how you progress and ask questions about specifics as general questions can be more suitable for a hands-on education and not so productive for slow typists like myself.

Jon

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote
Thanked by:
  #17 (permalink)
wown
Boston
 
Posts: 21 since Nov 2010
Thanks Given: 0
Thanks Received: 17

Thanks TJ. That is kind of what I needed. I actually did not realize that you can download all those strats from NT forums (should have checked). Time to begin reading and running those strats in debug mode

Reply With Quote
  #18 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


wown View Post
Thanks TJ. That is kind of what I needed. I actually did not realize that you can download all those strats from NT forums (should have checked). Time to begin reading and running those strats in debug mode

In that case, also put this in your favs:
NinjaScript Educational Resources - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Jon

Writing to you from the wonderful province of Ontario, Canada. Home to the world's biggest natural negative ion generator, the Niagara Falls, and to those that dare to know how to go over it in a barrel. SALUTE!
Reply With Quote




Last Updated on March 9, 2011


© 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