NexusFi: Find Your Edge


Home Menu

 





Attack of the Robots - An Algo Journal


Discussion in Trading Journals

Updated
      Top Posters
    1. looks_one vmodus with 357 posts (859 thanks)
    2. looks_two SMCJB with 38 posts (84 thanks)
    3. looks_3 kevinkdog with 27 posts (70 thanks)
    4. looks_4 bobwest with 13 posts (53 thanks)
      Best Posters
    1. looks_one bobwest with 4.1 thanks per post
    2. looks_two kevinkdog with 2.6 thanks per post
    3. looks_3 vmodus with 2.4 thanks per post
    4. looks_4 SMCJB with 2.2 thanks per post
    1. trending_up 94,155 views
    2. thumb_up 1,141 thanks given
    3. group 61 followers
    1. forum 478 posts
    2. attach_file 181 attachments




 
Search this Thread

Attack of the Robots - An Algo Journal

  #341 (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,172 since Jan 2013
Thanks Given: 57,525
Thanks Received: 26,292


LastDino View Post
PKAMA is pretty good, might want to also check out MAMA and FAMA.

//Side note, reading that again sounds so weird, but I'm just messenger, their inventors named them like that

...

Will look forward to what you come up with those three

If I"m not mistaken, I think MAMA and FAMA are Ehlers creations. I'll have to look in the books at some point. He probably has others, being as prolific as he is.

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #342 (permalink)
 
AllSeeker's Avatar
 AllSeeker 
Mumbai, India
Legendary Pratik_4Clover
 
Experience: Beginner
Platform: TradingView & ZerodhaKite
Trading: NIFTY, BANKNIFTY
Frequency: Daily
Duration: Minutes
Posts: 1,426 since Jan 2019
Thanks Given: 5,249
Thanks Received: 5,014


bobwest View Post
If I"m not mistaken, I think MAMA and FAMA are Ehlers creations. I'll have to look in the books at some point. He probably has others, being as prolific as he is.

Bob.

I think so too, honestly I've never read the books directly, TV has massively active coders community and its been around for couple of years, which makes it very easy for me to find things and read code first and understand what's going on than reading the book or paper which I don't understand >.>'

Edited
@bobwest
Here is the paper with easy language code attached to it.
https://mesasoftware.com/papers/MAMA.pdf

John Ehler is president of Mesasoftware and he publishes these papers under its domain. I'm saving you some trouble to find that book and article

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #343 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853



LastDino View Post
PKAMA is pretty good, might want to also check out MAMA and FAMA.

//Side note, reading that again sounds so weird, but I'm just messenger, their inventors named them like that



Will look forward to what you come up with those three

Thanks @LastDino . I also use the MAMA and FAMA, mostly as an academic exercise. For what I do, I have found these two to not be as responsive as I like. Maybe I will post one of my failed MAMA/FAMA strategies here just for fun. I will return to both of these indicators given what I have learned about KAMA, as I see them now in a different light. I may have been using them wrong.

If you have tuned into either of my two journals for any length of time, you'll know I'm a big fan of John Ehlers, who is retiring soon. I get a kick out of the nickname of MAMA >>> Mother of All Moving Averages. I will miss his goofball humor.

Vitale Aparine wrote an article in the April 2018 issue of TASC, where he introduces an alternate AMA and then discusses trading the newer AMA and KAMA together. Here is a link to the code for that article: TRADERS’ TIPS - APRIL 2018

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #344 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


LastDino View Post
I think so too, honestly I've never read the books directly, TV has massively active coders community and its been around for couple of years, which makes it very easy for me to find things and read code first and understand what's going on than reading the book or paper which I don't understand >.>'

Edited
@bobwest
Here is the paper with easy language code attached to it.
https://mesasoftware.com/papers/MAMA.pdf

John Ehler is president of Mesasoftware and he publishes these papers under its domain. I'm saving you some trouble to find that book and article

Haha, our responses got crossed up. Thanks guys!

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #345 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


bobwest View Post
If I"m not mistaken, I think MAMA and FAMA are Ehlers creations. I'll have to look in the books at some point. He probably has others, being as prolific as he is.

Bob.

You can refer to: Rocket Science for Traders, by John Ehlers. Also, Trading Systems and Methods 6e, by Perry Kaufman. Or just ask me.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #346 (permalink)
 
AllSeeker's Avatar
 AllSeeker 
Mumbai, India
Legendary Pratik_4Clover
 
Experience: Beginner
Platform: TradingView & ZerodhaKite
Trading: NIFTY, BANKNIFTY
Frequency: Daily
Duration: Minutes
Posts: 1,426 since Jan 2019
Thanks Given: 5,249
Thanks Received: 5,014


vmodus View Post
Thanks @LastDino . I also use the MAMA and FAMA, mostly as an academic exercise. For what I do, I have found these two to not be as responsive as I like. Maybe I will post one of my failed MAMA/FAMA strategies here just for fun. I will return to both of these indicators given what I have learned about KAMA, as I see them now in a different light. I may have been using them wrong.

If you have tuned into either of my two journals for any length of time, you'll know I'm a big fan of John Ehlers, who is retiring soon. I get a kick out of the nickname of MAMA >>> Mother of All Moving Averages. I will miss his goofball humor.

Vitale Aparine wrote an article in the April 2018 issue of TASC, where he introduces an alternate AMA and then discusses trading the newer AMA and KAMA together. Here is a link to the code for that article: TRADERS’ TIPS - APRIL 2018

Lmao, yes, that is indeed the heading of the paper I linked too.

He is really OG of indicator factories. To the point where I think its hard for me to keep up. Thank god I learned bit of coding

Visit my NexusFi Trade Journal Reply With Quote
  #347 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

My journal updates have been less frequent, as my workload is pretty heavy right now. However, in the quiet times, I spend some time working my trading ideas. One of my current favorite sources for ideas and knowledge is the epic, Trading Systems and Methods, 6th Edition, by Perry Kaufman. This book is fairly exhaustive in it's coverage of trading systems new and old. If you want to know about trading moon cycles, it's in there. Directional Parabolic SAR? It's in there. Ehler's cycles? Yeah, it's in there. I said exhaustive, right? He does not judge any particular system or indicator, but shows how they may perform against similar a particular indicator or idea.

Anyhow, I learned one new thing (Global Dictionary), and flexed my muscles on ADE (All Data Everywhere). One of the earlier limitations of TradeStation was it's inability to be able to share data between charts. An EasyLanguage enthusiast developed ADE and made it available to the masses at no cost. I won't get into the history, but TradeStation now supports ADE, which is essentially an extension of it's EasyLanguage Collections. There is a good wiki article I will link at the end of this post, describing the differences between some of the tools available to share data.

Late yesterday and early this morning, I worked on a problem for my partner, which involved getting indicator data from Data2 (think: a second chart, but different timeframe). The normal way of referencing Data2 is to just put in something like: Value1 = Close of Data2 . In English, this is: Get me the current close from the second chart and store it in the variable Value1. Unfortunately, it gets sticky when trying to use functions and Data2.

My solution:
  • Write an indicator to calculate values from Data2 data
  • Store those values using ADE
  • Retrieve those values in the strategy using ADE
It took a little bit of time, and the TradeStation Development Environment crashed for no good reason so I had to rewrite some code, but eventually I got it working. The indicator doesn't actually show anything, but it calculates the values needed for that timeframe/data set and passes them up to the strategy.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~
This is what I'm looking at this week:



I am thinking of a scalping strategy using Parabolic SAR and DMI. This was inspired by Kaufman's aforementioned book, though the original idea was more around swing trading and not scalping (credit: Wilder). I am testing a couple of theories. On this chart, I'm looking at 25 ticks... the shortest interval I've ever used for serious trading consideration.

At the bottom of the chart is my implementation of Kase's DevStop concept. It is just there, as I am trying to decide if it is useful for placing stoplosses. I picked up this idea from one of Kase's articles a while ago, but this is also in Kaufman's book.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~
That's all for now. Here is the link to the TradeStation article mentioned above:

https://community.tradestation.com/wiki/display/EasyLanguage/Comparing+GVs%2C+ELC%2C+ADE%2C+TZS+and+GD

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #348 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

The chart I showed early was missing one indicator that I want to show:



I put my color changing Adaptive Moving Average/KAMA (see my posts from last week, or the downloads section for TradeStation and MultiCharts indicators that I shared) on this chart, to show it's usefulness with the Parabolic SAR. The Parabolic SAR is great for some things, but staying in a trend is not one of it's strengths. On the 25 tick chart above, the Parabolic SAR and DMI would both have probably caused an early exit. KAMA helps say the course and extract more profit from this move.

Anyhow, that is interesting to me now and maybe profitable later.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #349 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

I forgot to mention, exiting on the color change from white to blue would have extracted another $750 from this move. This move happened this morning while I was testing some code.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #350 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


Working with the Kase DevStop
I have been doing some analysis this week on Parabolic SAR (PSAR) and I wanted to see how the Kase DevStop worked against other exit models. A link to one of Cynthia Kase's articles on DevStop is at the end of this entry. I stumbled across the article a couple years ago, but never quite understood how to properly implement it until this week.

The general idea is this, way over-simplified:
When you are in a position, use the Kase DevStop to ratchet up your stop loss/exit point. In other words, use it to set your trailing stop.

The implementation into an automated strategy is another topic altogether, but I wanted to see it's utility. Firstly, I took one of the worst weeks from my perspective: indexes in the first full week of August. I was trading metals and avoided the mess in the index futures, but all of our models failed miserably or struggled.

I simply used identical entries (PSAR), and pitted PSAR against Kase DevStop3 (3.3 standard deviations) for exit, assuming the use of stop and limit orders.

Results:
  • 24 trades altogether, using ES
  • PSAR stops fared worse, with a 33% greater drawdown and 50% greater losses overall
  • DevStop3 gave a better exit 18 times, and worse exits 6 times
  • DevStop3 did not do well when price action flattened, which can be expected when using standard deviations; two positions were exited before profitable breakouts
  • PSAR exit P&L: -1,481
  • DevStop3 exit P&L: -1,019
Since it is nearly impossible to reasonably show the DevStop, here are the results from my second test, also done on ES and for this week. In this case, I looked at four things: no stop loss, DevStop3, stop loss of $500, and PSAR exit. Here are the results for 13 trades:

Cumulative P&L


...and a pretty graph:
Equity Curves


Clearly, the DevStop3 performed better here. No stop loss is, as we should all know, a bad idea, so no surprise there. All I can say is that as price action slows down, the DevStop gets tight. Just on a simple system that is not really tradable, it outperformed the other methods. It even made that crappy week in August a little less horrible.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

That is all I have for now. Here is a link to the Kase article from 2005, though if you have Trading Systems and Methods 6th edition, you will find a section on DevStop.

https://www.kaseco.com/support/articles/Setting_Stop-Losses_Using_Price_Volatility.pdf

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on March 31, 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