NexusFi: Find Your Edge


Home Menu

 





Help requested for MESA MAMA FAMA indicator function


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Lamboo with 6 posts (2 thanks)
    2. looks_two gpw797 with 5 posts (0 thanks)
    3. looks_3 cbritton with 4 posts (2 thanks)
    4. looks_4 ABCTG with 3 posts (4 thanks)
      Best Posters
    1. looks_one ABCTG with 1.3 thanks per post
    2. looks_two Big Mike with 1 thanks per post
    3. looks_3 cbritton with 0.5 thanks per post
    4. looks_4 Lamboo with 0.3 thanks per post
    1. trending_up 14,844 views
    2. thumb_up 10 thanks given
    3. group 5 followers
    1. forum 21 posts
    2. attach_file 0 attachments




 
Search this Thread

Help requested for MESA MAMA FAMA indicator function

  #11 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,440 since Jun 2009
Thanks Given: 33,207
Thanks Received: 101,599


gpw797 View Post
Changed name and got it to compile not excluding the last line. But not getting any signals generated from the following. What am I doing wrong? Thanks Sorry I am beginner at this stuff but trying to learn


 
Code
//First attempt at MAMA FAMA

Inputs: 
	Price((H+L)/2), 
	FastLimit(.5),
	SlowLimit(.05),
	contractsize (1);

Variables:
	MAMA (0),
	FAMA (0);
	
If FAMA > MAMA then Buy contractsize Contracts Next Bar At Market;  

If FAMA < MAMA then Sell short contractsize Contracts Next Bar At Market;

You left out where it calls the function. Place it just above your first if statement.

value0 = MAMA_FAMA(price, fastlimit, slowlimit, MAMA, FAMA);

In this case value0 is a placeholder, it does nothing but facilitate the call to the function. The function then replaces your local variables 'MAMA' and 'FAMA' with a result set from the function.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
Increase in trading performance by 75%
The Elite Circle
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
23 thanks
My NQ Trading Journal
16 thanks
HumbleTraders next chapter
9 thanks
  #12 (permalink)
 gpw797 
Mesa, AZ
 
Posts: 55 since Oct 2010

Thanks that works

Reply With Quote
  #13 (permalink)
 Lamboo 
Stockholm
 
Experience: Intermediate
Platform: Nanotrader/ tradestaion
Broker: WHS / TS
Trading: EC / SI / ES / BP
Posts: 19 since Mar 2011
Thanks Given: 8
Thanks Received: 5



gpw797 View Post
Thanks that works

does someone still use this strategy, an have an ELD file from it?

Reply With Quote
  #14 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Lamboo,

this thread contains all the code you need to compile the strategy within your Tradestation platform.
First you should create the function called Mama_Fama.
Then you can create a signal with a name of your choice. Use the code @Big Mike quoted in his post here and also make sure to include the function as he advised gpw797 to do.
This should give you a strategy that compiles and displays entries on the chart.

Regards,
ABCTG


Lamboo View Post
does someone still use this strategy, an have an ELD file from it?


Follow me on Twitter Reply With Quote
Thanked by:
  #15 (permalink)
 Lamboo 
Stockholm
 
Experience: Intermediate
Platform: Nanotrader/ tradestaion
Broker: WHS / TS
Trading: EC / SI / ES / BP
Posts: 19 since Mar 2011
Thanks Given: 8
Thanks Received: 5


ABCTG View Post
Lamboo,

this thread contains all the code you need to compile the strategy within your Tradestation platform.
First you should create the function called Mama_Fama.
Then you can create a signal with a name of your choice. Use the code @Big Mike quoted in his post here and also make sure to include the function as he advised gpw797 to do.
This should give you a strategy that compiles and displays entries on the chart.

Regards,
ABCTG

Thankx ABCTG
Yepp, I tried, but keep getting errors when verifying.
Have to say I'm not so good with easylanguage

Reply With Quote
  #16 (permalink)
 Lamboo 
Stockholm
 
Experience: Intermediate
Platform: Nanotrader/ tradestaion
Broker: WHS / TS
Trading: EC / SI / ES / BP
Posts: 19 since Mar 2011
Thanks Given: 8
Thanks Received: 5


Lamboo View Post
Thankx ABCTG
Yepp, I tried, but keep getting errors when verifying.
Have to say I'm not so good with easylanguage

OK I made it! :-)

Reply With Quote
Thanked by:
  #17 (permalink)
 Lamboo 
Stockholm
 
Experience: Intermediate
Platform: Nanotrader/ tradestaion
Broker: WHS / TS
Trading: EC / SI / ES / BP
Posts: 19 since Mar 2011
Thanks Given: 8
Thanks Received: 5


Lamboo View Post
OK I made it! :-)

I made it, but it does'nt do what I would like it to do :-(

I want it to buy and sell everytime the two lines of my MAMA indicator crosses. but he seems to do someting else.

Reply With Quote
  #18 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Lamboo,

what does it do exactly? If you post the code I can take it look at it and point you towards what might be wrong.

Regards,
ABCTG


Lamboo View Post
I made it, but it does'nt do what I would like it to do :-(

I want it to buy and sell everytime the two lines of my MAMA indicator crosses. but he seems to do someting else.


Follow me on Twitter Reply With Quote
Thanked by:
  #19 (permalink)
 Lamboo 
Stockholm
 
Experience: Intermediate
Platform: Nanotrader/ tradestaion
Broker: WHS / TS
Trading: EC / SI / ES / BP
Posts: 19 since Mar 2011
Thanks Given: 8
Thanks Received: 5


ABCTG View Post
Lamboo,

what does it do exactly? If you post the code I can take it look at it and point you towards what might be wrong.

Regards,
ABCTG

Ok the like here worked to verify, but it dosnt really buys and sells when my mama lines crosses


//First attempt at MAMA FAMA

Inputs:
Price((H+L)/2),
FastLimit(.5),
SlowLimit(.05),
contractsize (1);

Variables:
MAMA (0),
FAMA (0);
value0 = MAMA_FAMA(price, fastlimit, slowlimit, MAMA, FAMA);

If FAMA > MAMA then Buy contractsize Contracts Next Bar At Market;

If FAMA < MAMA then Sell short contractsize Contracts Next Bar At Market;




And if you look at my screenshot it seems that he does theopposite.
he buys where he should sell and vica versa

https://screencast.com/t/CZgnLSTdvOhg

Reply With Quote
  #20 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627


Lamboo,

the code trades based on the MAMA FAMA relation. When do you want the strategy to buy and when should it sell short?
If you think it only does the opposite, then change the entry condition. Instead of checking for "If FAMA > MAMA then" for a buy change it to "If FAMA < MAMA then". Do the same for the short entry and you have the entry logic reversed.

Regards,
ABCTG


Lamboo View Post
Ok the like here worked to verify, but it dosnt really buys and sells when my mama lines crosses


//First attempt at MAMA FAMA

Inputs:
Price((H+L)/2),
FastLimit(.5),
SlowLimit(.05),
contractsize (1);

Variables:
MAMA (0),
FAMA (0);
value0 = MAMA_FAMA(price, fastlimit, slowlimit, MAMA, FAMA);

If FAMA > MAMA then Buy contractsize Contracts Next Bar At Market;

If FAMA < MAMA then Sell short contractsize Contracts Next Bar At Market;




And if you look at my screenshot it seems that he does theopposite.
he buys where he should sell and vica versa

2014-08-23_1433 - Buckylamboo's library


Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on October 7, 2014


© 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