OSMA (MACD Histogram) Strategy

Strategies are published here.

Moderator: admin

OSMA (MACD Histogram) Strategy

Postby Apprentice » Mon Jun 27, 2011 10:39 am

OsMA Strategy.png


Based on OSMA Indicator.
viewtopic.php?f=17&t=1856&p=7294&hilit=OsMA#p7294
OsMA is Difference between the Moving Average Convergence/Divergence and the signal line.

The signal provides three types of signals.
Histogram Zero Line Cross, Histogram Top / Bottom, Histogram Reverse.

Histogram Top / Bottom signal is generated whenever the indicator changes color.
Top signal is given only when the OsMA is in a positive territory.
Bottom signal is given only when the OsMA is in negative territory.

Histogram Reverse signal is generated whenever the indicator changes color.

OsMA Strategy.lua
(17.35 KiB) Downloaded 1611 times


The Strategy was revised and updated on December 18, 2018.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36474
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: OSMA (MACD Histogram) Strategy

Postby friedrio » Tue Apr 10, 2012 7:47 am

Hi Apprentice,

can you combine:

average strategy and Osma strategy ???

thy
friedrio
friedrio
 
Posts: 14
Joined: Mon Jan 30, 2012 8:46 am



Re: OSMA (MACD Histogram) Strategy

Postby jfost2010 » Tue Jun 19, 2012 11:06 am

Hi.

I installed this indicator and set it up for the 1M timeframe to test it and it does not make trades. I also backtested it and still no trades. I am using the settings

Top/Bottom
Short EMA: 9
Long EMA: 64
Signal: 112
Price Type: Close

Type of signal: Direct

Time Parameters: all default

Timeframe: M1

Allow to trade: Yes
Both sides: Yes
No limits
No stops,

I am running the latest version of TradeStation version 1.11.011212

Any help would be much appreciated!! Thanks for your time!!

-JF
jfost2010
 
Posts: 2
Joined: Tue Jun 19, 2012 10:03 am


Re: OSMA (MACD Histogram) Strategy

Postby jfost2010 » Wed Jun 20, 2012 9:40 am

Still no trades. I places some Signal statements in the code to see what is getting executed and it made it as far as this line:

if OSMA.HISTOGRAM:hasData(period-1) and OSMA.HISTOGRAM:hasData(period) then

there is never a true result for this line, also the line

elseif OSMA.HISTOGRAM:hasData(period-2) and ( SignalType == "TREND" or SignalType == "BOTH") then

never has a true result.

My coding skills are limited but it looks like the values for OSMA:HISTOGRAM are null (or something) and the part of the code that makes the trades never gets hit.

I have the OSMA.lua indicator installed, but I see that you are populating the table with values from the MACD so I don't think that is the issue.

Any ideas??

I appreciate your help and patience!! Thanks!!

-JF
jfost2010
 
Posts: 2
Joined: Tue Jun 19, 2012 10:03 am


Re: OSMA (MACD Histogram) Strategy

Postby SavvyStrategist » Thu Jun 18, 2015 3:57 pm

Does this strategy include alerts? Sounds, I mean, notifications. I've seen some custom strategies that require a separate file to be installed and I'm hoping this one does not.

Edit: It does. Sorry, I should have tried it out. It's actually a very, very complete and comprehensive strategy, having many customizable options.
SavvyStrategist
 
Posts: 30
Joined: Mon May 04, 2015 6:55 pm

Re: OSMA (MACD Histogram) Strategy

Postby SavvyStrategist » Fri Jun 19, 2015 3:02 pm

Could you combine this strategy with Bollinger Bands? Basically, I'm looking for an alert to sound when prices have touched BB and the OsMA indicator subsequently changes color. The exact criteria could be tricky, either too restrictive or too loose, so I would suggest something along the lines of:

1. A number of periods could be specified within which "prices reached BB, then OsMA changed color". One period would be the default, so OsMA would have to change color on the very next candle close after prices reached the upper or lower Bollinger Band. Two, three, or perhaps even four periods could be considered. Without this option, I fear the strategy would be too unpredictable.

2. The number of standard deviations to consider for calculating Bollinger Bands, for the same reason. The default 2.0 standard deviations might be too restrictive, resulting in fewer signals. Somewhere between 1.8 and 2.0 might be more appropriate. Either way, it should be user-specifiable.

3. Being able to determine whether one wants buy or sell signals, as having both would be much too risky for such a sensitive set of indicators.

I sincerely hope this is possible.
SavvyStrategist
 
Posts: 30
Joined: Mon May 04, 2015 6:55 pm

Next

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 34 guests