NexusFi: Find Your Edge


Home Menu

 





Bot Trading - MCL Futures


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one syswizard with 30 posts (6 thanks)
    2. looks_two kevinkdog with 26 posts (27 thanks)
    3. looks_3 Hulk with 9 posts (20 thanks)
    4. looks_4 SMCJB with 9 posts (13 thanks)
      Best Posters
    1. looks_one Hulk with 2.2 thanks per post
    2. looks_two FastNCurious with 1.8 thanks per post
    3. looks_3 SMCJB with 1.4 thanks per post
    4. looks_4 kevinkdog with 1 thanks per post
    1. trending_up 21,446 views
    2. thumb_up 114 thanks given
    3. group 457 followers
    1. forum 119 posts
    2. attach_file 15 attachments




 
Search this Thread

Bot Trading - MCL Futures

  #11 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


syswizard View Post
No optimization done. Testing done on a 600 tick chart.

How many years did you test for? Can you show equity curve?



syswizard View Post
Which strategy?

This equity curve. Is this the strategy we are talking about? What made you look at this and say "this has to be improved?"








syswizard View Post
I am using intraday bars, but I would like to know the reason that it will never work on daily bars. Sheesh, I learn something every day.

For Daily bars, or intraday for the last bar of the day, the "close position" signal gets sent after market is actually closed, thus Exchange rejects it.

Follow me on Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Exit Strategy
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #12 (permalink)
 
syswizard's Avatar
 syswizard 
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ / CL / RTY / YM / BTC
Posts: 344 since Jan 2019
Thanks Given: 20
Thanks Received: 146


kevinkdog View Post
How many years did you test for? Can you show equity curve?

Just 2022 YTD. Working on the equity curve

kevinkdog View Post
This equity curve. Is this the strategy we are talking about? What made you look at this and say "this has to be improved?"

Well, my experience with fixed profit taking targets is that you leave a lot on the table.
I was just curious as to whether this could be improved upon with a trailing stop.

kevinkdog View Post
For Daily bars, or intraday for the last bar of the day, the "close position" signal gets sent after market is actually closed, thus Exchange rejects it.

Well for intraday bars, this is simple: set the close position order to be 1 minute before the close. The killer is: holiday's....gotta know when the market closes at 1 pm.
What's your fix for this problem ?

Reply With Quote
  #13 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338



syswizard View Post
Just 2022 YTD. Working on the equity curve

Gotcha. Problem will be you don't have years of tick data to backtest.



syswizard View Post
Well, my experience with fixed profit taking targets is that you leave a lot on the table.
I was just curious as to whether this could be improved upon with a trailing stop.

I see that too, and as long as you did not optimize the settings, you do avoid some of the danger in switching exits. There is risk doing this though.


syswizard View Post
Well for intraday bars, this is simple: set the close position order to be 1 minute before the close. The killer is: holiday's....gotta know when the market closes at 1 pm.
What's your fix for this problem ?

If you are using tick charts, you could run into issues if a bar never closes due to lack of ticks. I assume you are doing a custom session too. For Tradestation, there is a nice holiday function done by Suri Dudella that will help with this.

Follow me on Twitter Reply With Quote
  #14 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338

I was going to try to an equity curve for you, but I do not have the functions in your trailing stop code:

_szHIHILOLO

_szFormatDate

Follow me on Twitter Reply With Quote
  #15 (permalink)
 
syswizard's Avatar
 syswizard 
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ / CL / RTY / YM / BTC
Posts: 344 since Jan 2019
Thanks Given: 20
Thanks Received: 146

Sorry about that Kevin.....see attached.

Note: I found that a retracement of 20% works pretty well.
To do: provide an option to make retracement a function of volatility. Higher volatility = higher percentage.

Attached Files
Elite Membership required to download: Kevin.pla
Reply With Quote
  #16 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


syswizard View Post
Sorry about that Kevin.....see attached.

Note: I found that a retracement of 20% works pretty well.
To do: provide an option to make retracement a function of volatility. Higher volatility = higher percentage.

I'm confused, I thought you said you did not optimize anything with your trailing stop, and that your results were "much better." Now it sounds like you tested a few variations, and 20% worked pretty well.

Can you show the results from your original test?

I'd still like to see that a trailing stop beats the simple stop and profit target over the same time period from 2010 to present (edit: although that is not an apples to apples comparison, considering out of sample, etc)

Follow me on Twitter Reply With Quote
  #17 (permalink)
 
syswizard's Avatar
 syswizard 
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ / CL / RTY / YM / BTC
Posts: 344 since Jan 2019
Thanks Given: 20
Thanks Received: 146


kevinkdog View Post
Can you show the results from your original test?

too many tests....I've lost the results.
Need to do some disciplined tests here...with just a few variations on parameters.


kevinkdog View Post
I'd still like to see that a trailing stop beats the simple stop and profit target over the same time period from 2010 to present (edit: although that is not an apples to apples comparison, considering out of sample, etc)

This is the absolute test for sure. Should we test on daily crude oil or intraday bars of ES ?

Reply With Quote
  #18 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338


syswizard View Post
too many tests....I've lost the results.
Need to do some disciplined tests here...with just a few variations on parameters.


This is the absolute test for sure. Should we test on daily crude oil or intraday bars of ES ?


Bummer you lost the results, because you seemed pretty upbeat and confident that you did better than what I showed.


Oh well


I would not test it on Daily Crude, because if you do better than what I show, that's just optimizing. I'm sure you could do better, but you'd be comparing my out-of-sample results the past few years to your in-sample results.

You can try it on other markets and bar sizes, maybe it will work, maybe not.

Follow me on Twitter Reply With Quote
  #19 (permalink)
 
syswizard's Avatar
 syswizard 
Philadelphia PA
 
Experience: Advanced
Platform: Multicharts
Broker: Ironbeam, Rithmic
Trading: Emini ES / NQ / CL / RTY / YM / BTC
Posts: 344 since Jan 2019
Thanks Given: 20
Thanks Received: 146


kevinkdog View Post
because if you do better than what I show, that's just optimizing.

That's not true Kevin, let's just pick a number....say 50%. That's HWB (Half Way Back).
True, I could do some optimizing, but I am not forced to do so.

Reply With Quote
  #20 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,645 since Jul 2012
Thanks Given: 1,890
Thanks Received: 7,338



syswizard View Post
That's not true Kevin, let's just pick a number....say 50%. That's HWB (Half Way Back).
True, I could do some optimizing, but I am not forced to do so.


Here is what I mean:

Version 1: the strategy and results I show

Version 2: the trailing stop strategy you create, whether or not you do any parameter optimizing


If you compare Versions 1 and 2, and pick either one because it looks better (however you define it), you have optimized.

Do you see what I am getting at?

Follow me on Twitter Reply With Quote




Last Updated on September 23, 2022


© 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