NexusFi: Find Your Edge


Home Menu

 





ana SuperTrend.......


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Fat Tails with 12 posts (11 thanks)
    2. looks_two cbritton with 9 posts (13 thanks)
    3. looks_3 Serger with 5 posts (0 thanks)
    4. looks_4 tst1 with 5 posts (0 thanks)
      Best Posters
    1. looks_one cbritton with 1.4 thanks per post
    2. looks_two sharky with 1 thanks per post
    3. looks_3 Fat Tails with 0.9 thanks per post
    4. looks_4 ABCTG with 0.8 thanks per post
    1. trending_up 33,347 views
    2. thumb_up 32 thanks given
    3. group 17 followers
    1. forum 48 posts
    2. attach_file 14 attachments




 
Search this Thread

ana SuperTrend.......

  #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,443 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,607


Fat Tails View Post
Looks good now. If it is not identical, it comes very close at least. I think you made it.

@Fat Tails, I still hold out hope you'll leave the dark side and come to the EasyLanguage camp with MultiCharts...



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

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #12 (permalink)
 
sharky's Avatar
 sharky 
MIAMI,FL
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, tradingview
Broker: Private
Trading: Crypto and natural gas
Posts: 1,063 since Jun 2009
Thanks Given: 625
Thanks Received: 3,906

Bullcrap Mike we need him over here on the dark side,may someone elses force be with you lol...sharky

KILLING THE MARKETS DAILY
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #13 (permalink)
 sharmas 
Auckland
 
Experience: Advanced
Platform: Ninja Trader
Broker: Zen-Fire
Trading: CL and ES
Posts: 778 since Apr 2010
Thanks Given: 3,822
Thanks Received: 750


totally with Sharky on this one Mike....

Visit my NexusFi Trade Journal Reply With Quote
  #14 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Big Mike View Post
@Fat Tails, I still hold out hope you'll leave the dark side and come to the EasyLanguage camp with MultiCharts...



Mike


@Big Mike:

I do not see any dark side. As you have put it, both NinjaTrader and MultiCharts have advantages and shortcomings. I will probably use MultiCharts sooner or later just to diversify, as I want to reduce my dependence on a single software package. Further I am aware of the huge collection of indicators and strategies for TradeStation, which can be used with MultiCharts.

On the other side there is little I can gain from this step, as long as I do discretionary trading. It might be different, if I want to run automated strategies.

Also it is convenient to let you test various software packages and wait for the outcome.

Reply With Quote
Thanked by:
  #15 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256


cbritton View Post

Here's the function for moving median:

Fixed a mistake. The error won't affect the calculation or the outcome of the charts I posted. Here's the updated moving median function:

 
Code
inputs:
    Price(NumericSeries),
    length(NumericSimple);

variables: 
    int period(0),
    int idx(0),
    int meanIdx(0),
    int priorIdx(0),
    float MA(0.0);
    
Array: float mArray[](0);
    
if length < 1 then period = 1 else period = length; //throw some exception

Array_SetMaxIndex(mArray, period);

if currentbar < period then begin
    value1 = currentbar + 1;
    for idx = 0 to value1 - 1 begin  // inclusive?
        mArray[idx] = price[idx];
    end;
    value2 = SortArray(mArray,period,1);  //ascending?? should not matter since we're getting the median
    
    if mod(period, 2) = 0 then MA = 0.5 * (mArray[value1/2] + mArray[value1/2-1])
    else MA = mArray[(value1-1)/2];

end else begin

    for idx = 0 to period - 1 begin
        mArray[idx] = price[idx];
    end;
    value2 = SortArray(mArray,period,1);
    if mod(period, 2) = 0 then 
        MA = 0.5 * (mArray[period/2] + mArray[period/2-1])
    else
        MA = mArray[(period-1)/2];

end;

_MovingMedian = MA;
Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
  #16 (permalink)
 
Serger's Avatar
 Serger 
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: Interactive Brokers
Trading: Ym, Es
Posts: 74 since Oct 2010
Thanks Given: 64
Thanks Received: 25

Hello guys,,
I am impressed by your work .. you have an idea where I can find information and how or programer, easy language
it remains a mystery but I would like learn ......
thank you all for your help ...
Serger

Started this thread Reply With Quote
  #17 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256


Serger View Post
Hello guys,,
I am impressed by your work .. you have an idea where I can find information and how or programer, easy language
it remains a mystery but I would like learn ......
thank you all for your help ...
Serger

Where I started: Free Tutorials for [AUTOLINK]EasyLanguage[/AUTOLINK] Services for TradeStation

Regards,
-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Reply With Quote
Thanked by:
  #18 (permalink)
 
Serger's Avatar
 Serger 
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: Interactive Brokers
Trading: Ym, Es
Posts: 74 since Oct 2010
Thanks Given: 64
Thanks Received: 25

Super,
good reading for this weekend
Thank you
Serger

Started this thread Reply With Quote
  #19 (permalink)
 
Serger's Avatar
 Serger 
Quebec
 
Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker: Interactive Brokers
Trading: Ym, Es
Posts: 74 since Oct 2010
Thanks Given: 64
Thanks Received: 25

Some problems to Compile this code
whit words "movingmedian ....and period'' .... ????
Do you send a Pla. or compiled fonction ??
Thank you so much ...
Serger

Started this thread Reply With Quote
  #20 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256



Serger View Post
Some problems to Compile this code
whit words "movingmedian ....and period'' .... ????
Do you send a Pla. or compiled fonction ??
Thank you so much ...
Serger

TS does not support pla types. Try to import this eld file.

-C

“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Attached Files
Elite Membership required to download: ANASUPERTREND.ELD
Reply With Quote
Thanked by:




Last Updated on April 10, 2018


© 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