NexusFi: Find Your Edge


Home Menu

 





Help backtesting/automating


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one DavidHP with 7 posts (3 thanks)
    2. looks_two rscr with 6 posts (3 thanks)
    3. looks_3 bobwest with 5 posts (2 thanks)
    4. looks_4 blackgrey45 with 1 posts (0 thanks)
    1. trending_up 941 views
    2. thumb_up 8 thanks given
    3. group 3 followers
    1. forum 18 posts
    2. attach_file 0 attachments




 
Search this Thread

Help backtesting/automating

  #1 (permalink)
 rscr 
san jose costa rica
 
Experience: Intermediate
Platform: trading station
Trading: forex
Posts: 22 since Jun 2014
Thanks Given: 135
Thanks Received: 9

Am an old guy (84), totally lost when it comes to navigating technology.
Have developed an ES strategy for NT8 using UniRenko bars. Seeking help to backtest for viability and possibility to automate. Will happily compensate via PayPal for time spent.
All input will be greatly appreciated.

Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Build trailing stop for micro index(s)
Psychology and Money Management
Online prop firm The Funded Trader (TFT) going under?
Traders Hideout
Deepmoney LLM
Elite Quantitative GenAI/LLM
Exit Strategy
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
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
37 thanks
NexusFi site changelog and issues/problem reporting
23 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #2 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,162 since Jan 2013
Thanks Given: 57,343
Thanks Received: 26,267


rscr View Post
Am an old guy (84), totally lost when it comes to navigating technology.
Have developed an ES strategy for NT8 using UniRenko bars. Seeking help to backtest for viability and possibility to automate. Will happily compensate via PayPal for time spent.
All input will be greatly appreciated.

You may want to better describe the strategy, to help people understand what you you need, and possibly to offer some suggestions.

If it isn't automated yet, "backtesting" probably will just be a manual process. However, if you can spell it out in sufficient detail, it may be possible to put something together that can be tested. A chart might also be helpful.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
  #3 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,609 since Aug 2009
Thanks Given: 11,328
Thanks Received: 2,743



rscr View Post
Am an old guy (84), totally lost when it comes to navigating technology.
Have developed an ES strategy for NT8 using UniRenko bars. Seeking help to backtest for viability and possibility to automate. Will happily compensate via PayPal for time spent.
All input will be greatly appreciated.

Greetings,
Please post more information about your issues.

One of the problems I already can see is the use of Rnko bars. They are challenging to backtest.
Awaiting your reply to see if I can help.

p.s. age is not an issue. I'm 73

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote
Thanked by:
  #4 (permalink)
 rscr 
san jose costa rica
 
Experience: Intermediate
Platform: trading station
Trading: forex
Posts: 22 since Jun 2014
Thanks Given: 135
Thanks Received: 9

Firstly: Dear Bob, the finger waving is deserved, just not paying enough attention to what you sent. In fact a lite spanking would not be out of place. Just to lazy to learn the forum navigation needs.

Thankyou for opening this new thread.

Hi David,
73 yrs ? Believe me you are still a teenager - huge difference between 73 and 84. HaHaHa!!!
Your end Quote is so true!!! Loved the movie with Gene Kelly. Still turn to watch him dancing on YOUTube,especially when down in the dumps.

Have used the below strategy to pass several prop evaluations. Problem is proper execution and staying with the rules and therefore the try for Automation.

It is my understanding that UniRenko bars lend themselves to backtesting?

UniRenko settings:
Tick trend 8 * Open offset 8 * Tick Reversal 22

ATM settings: For ES.
Take profit targets: 2
Target #1: 8 ticks and Stop Loss moves to Break even + 1 tick.

Target #2 trails by 8 ticks once target 1 has been filled.
Original Stop Loss: 12 ticks????
Trade is entered each time there is a bar Reversal. Must be with trend.
Should also test entry on 2nd bar color change.
Trend is determined by 50 EMA with 20 EMA and 10 EMA in sinc (on same side of 50 EMA)
On trend reversal: Entry on 1st bar close after 20 EMA cross over 50 EMA.

That's it - simple???? Maybe to simple?

STEP 1: Backstest confirmation of overall viability.
STEP 2: Automation - Semi or 100% - Need to discuss.
Step 3: Incorporation of a money management system for complete automation - if possible?

Was professional gambler for better then 10 yrs.
Used the below money management strategy,very successfully, when playing Blackjack. There are several additional steps but unnecessary in trading.

Money management strategy:
(if possible to incorporate. If to difficult it can be done so later in an Upgrade.

6 Steps in negative progression (units bet):
Progression Series in lots/units: 1-1-1-2/5-10
1-1-1-2 on win let ride on 2nd win return to step #1 of series.

1) After 1st win next bet doubles lot size (2 units). After ANY 2 wins in row return to beginning.
2) After loss of 3 units double 1st bet to 2 units.
3) On loss 2 unit (4th step) next bet is 5 units.
4) On win repat 5 unit wager - do not double but repeat.
5) On loss of 5 unit (total loss is now 10 units) return to beginning of series,

Objective is 2 wins in a row before losing 5 times (10 units in total)
1-1-1-2 / 5
The first 4 bets double on win - the 5th bets does not double but repeats for the needed 2 wins in row
We stop at 5 consecutive loses by going back to start of series, but could continue to infinity until achieving 2 consecutive losses.
I call this following the law of "Disproportionate Occurrences"

Hope the above is understandable.

Started this thread Reply With Quote
Thanked by:
  #5 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,609 since Aug 2009
Thanks Given: 11,328
Thanks Received: 2,743

One quick comment.

If the strategy is not automated, how do you plan to backtest?
The strategy analyzer has to 'see' the trades and if it can't it will not show anything.

Perhaps others will comment on the money management system you use,
I am not able to say much about that atm since FOOTBALL is on.

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote
Thanked by:
  #6 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,162 since Jan 2013
Thanks Given: 57,343
Thanks Received: 26,267


rscr View Post
Firstly: Dear Bob, the finger waving is deserved, just not paying enough attention to what you sent. In fact a lite spanking would not be out of place. Just to lazy to learn the forum navigation needs.

Thankyou for opening this new thread.

Hi David,
73 yrs ? Believe me you are still a teenager - huge difference between 73 and 84. HaHaHa!!!

Have used the below strategy to pass several prop evaluations. Problem is proper execution and staying with the rules and therefore the try for Automation.

It is my understanding that UniRenko bars lend themselves to backtesting?
...

I totally enjoyed every part of your response. Thanks for the reply.

I take it that I don't need to do any more finger shaking, then. Good. Then I'm not mad at you any more.

As to the age question, I am older than David, but younger than you. When people tell me you're only as old as you feel, I usually bite my tongue, but the more honest answer would be, "I hope not." Younger people can take this however they wish. I used to think I was invincible too.

-----------------------

As to the other parts of your reply:

Renko bars: there is more than one version of the Renko bar idea. The standard Renkos, and some others as well (such as UniRenko) cannot be used in the NT backtesting strategy analyzer (or whatever the current name for it is -- I've been away from NT for a while). The reason has to do with the open value of the bar, which is arbitrarily chosen (I think in UniRenko it's usually the half-way point of the previous bar, but I think you can vary that), and so it will not actually match to any real opening value your trade could actually have. This makes a very neat-looking chart, but the open values are always false. So if your system gives a "buy" on a particular bar, the NT backtester will register the open price of the trade as the open of the next bar, an arbitrary number which is not the open price of any actual trade you could have made there. Oops.

Note: that's how I understand it, but I don't do automation and it's just what I have gathered from reading other peoples' posts. But if this is even close to right, it shows you the problem: the NT backtesting thing will think you entered a buy, for example, at a price that is below the high of the last bar -- a nice price if you could get it, but you actually never could. So the backtest is always highly optimistic, but also always wrong. This has been discussed about a billion times on the forum, so I think it's accurate or close to accurate.

Is there a way around this? I think there are Renko bar variations that will give an accurate backtest, but I have no idea what they are. I think that @Fat Tails produced one, but I believe it is only available on his paid site, not in the free downloads here. There may be others, but I think they are also not free. I may be wrong about any or all of this, so I hope someone will comment to correct it if I am.

----------------------

Backtesting before automating: @DavidHP asks,

DavidHP View Post
If the strategy is not automated, how do you plan to backtest?
The strategy analyzer has to 'see' the trades and if it can't it will not show anything.

What he's saying is that a true backtest is an automated procedure. So you can't first test it to make sure it works, and then automate it.

There's sort of a semantic issue here. People will say "backtest" when all they really can mean is to sort of eyeball something to see if it's any good. And you can do that, and certainly should. But that's only to tell you whether it's worth the trouble to actually automate something and then run a test of what you have created, using the automated system.

----------------------

Money management, gambling, and all that: I agree with @DavidHP, who suggests others may want to comment. For myself, I have no idea if what you propose would work, and I am not about to try something that involves doubling down when I have a loss.

I read way too many posts where someone has a blown-out account because, instead of just taking a loss and living to trade another day, they thought they would double down because, basically, "it has to go back up sometime," or words to that effect. Two points: (a) no, it doesn't, (b) and it doesn't, before you are wiped out.

Just my thoughts on the management part, and I have never been a professional blackjack gambler, so I do not have an opinion, other than that.

Honestly, I didn't even read the details of the system you laid out. Not because I didn't think they have any value, but because there is no way to know without some way to look at the trades. If you could show a screenshot, with the indicated trades, it might be easier for others to see, on at least a visual examination, whether it looks reasonable or not.

-----------------------

I hope somebody will pick this up and run with any of the ideas you have thrown out. Or at least comment on them.

Good luck.

Bob.

-----------------------

PS, and when you lose, just take the loss and don't try to get it back or play some fancy games with doubling down. Until and unless you are a master trader, making a good long-term living from trading, you should not even think of stuff like this. Do basic stuff, make money and cut your losses, and don't get so complicated. And don't assume that blackjack and trading are the same. Of course, if you've been passing evaluations, maybe it's a good idea after all. But I wouldn't do it if I had a gun to my head. Just to make sure you know what I really think.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
  #7 (permalink)
 rscr 
san jose costa rica
 
Experience: Intermediate
Platform: trading station
Trading: forex
Posts: 22 since Jun 2014
Thanks Given: 135
Thanks Received: 9

Thank you Bob and David. Your kind comments and sincere advice is well taken.
It is time to move on to bigger and better endeavors.

“Take my advice and live for a long, long time. Because the maddest thing a man can do in this life is to let himself die.”
"Don Quixote"

But there again:
"Dang!!! This getting old is killing me"
Saying on my T- Shirt.

Started this thread Reply With Quote
Thanked by:
  #8 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,609 since Aug 2009
Thanks Given: 11,328
Thanks Received: 2,743


rscr View Post
Thank you Bob and David. Your kind comments and sincere advice is well taken.
It is time to move on to bigger and better endeavors.

I'm not trying to discourage you.
If you are up to trading, I suggest you trade.
Keeping your mind strong is the most important part of aging.

I was a little puzzled about backtesting if you were not using a strategy.
If you don't have one, there are several that are simple but not higly profitable.
I suggest a semi-automatic type may be the best. They can't be backtested but you have control over the trade.


As Mark Twin once said:
"Rumors of my demise are greatly exagerated"

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote
  #9 (permalink)
 rscr 
san jose costa rica
 
Experience: Intermediate
Platform: trading station
Trading: forex
Posts: 22 since Jun 2014
Thanks Given: 135
Thanks Received: 9

David, no worries I do not discourage easily. Am like an old dog with a tasty bone. Took me 2 yrs. to develop a Baccarat Strategy that I used in Casinos all over the globe. The best part was the comped suites, 1st class airline tickets, 5 star restaurants and even long distance phone calls.

I believe next step is to hire a programmer to automate and backtest a few months. Incorporating the Money Management strategy can wait for a future date if at all.
Or as Bob recommends discard it totally.

Used to have a young assistant performing all computer functions. Great guy but foolish enough to get killed on a Harley 2 yrs. ago. Miss him dearly in many ways.

Any suggestions for one that is not to pricey?

"Age is an issue of mind over matter".
Mark Twain.

Started this thread Reply With Quote
  #10 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,609 since Aug 2009
Thanks Given: 11,328
Thanks Received: 2,743


Best place to start is HERE
(click the word HERE)


p.s. I am building a house in the Yucatan, I see you are in Costa Rica. Are you an expat?


rscr View Post
David, no worries I do not discourage easily. Am like an old dog with a tasty bone. Took me 2 yrs. to develop a Baccarat Strategy that I used in Casinos all over the globe. The best part was the comped suites, 1st class airline tickets, 5 star restaurants and even long distance phone calls.

I believe next step is to hire a programmer to automate and backtest a few months. Incorporating the Money Management strategy can wait for a future date if at all.
Or as Bob recommends discard it totally.

Used to have a young assistant performing all computer functions. Great guy but foolish enough to get killed on a Harley 2 yrs. ago. Miss him dearly in many ways.

Any suggestions for one that is not to pricey?

"Age is an issue of mind over matter".
Mark Twain.


Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on October 11, 2023


© 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