NexusFi: Find Your Edge


Home Menu

 





EMA spread - how and where to start


Discussion in NinjaTrader

Updated
    1. trending_up 1,233 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

EMA spread - how and where to start

  #1 (permalink)
 micasa001 
Amsterdam
 
Experience: Master
Platform: Own
Trading: Currency
Posts: 9 since Jul 2017
Thanks Given: 4
Thanks Received: 1

Hi all,

I was working for a long time on TradingView but prefer the features NinjaTrader is giving. Now Im trying to start to add a simple EMA spread script as an indicator but lost already

What Im trying to do is to get a similar script as I use in Tradingview like this.

 
Code
sell_value = input(2)
buy_value = input(-2)
ema1_speed_fast = input(50)
ema1_speed_slow = input(50)

ema2_speed_fast = input(13)
ema2_speed_slow = input(34)


fastema1=ema(close,ema1_speed_fast)
slowema1=ema(close,ema1_speed_slow)
e=(fastema1/slowema1-1)*100

fastema2=ema(close,ema2_speed_fast)
slowema2=ema(close,ema2_speed_slow)
f=(fastema2/slowema2-1)*100

//plot(0, color=#404040, title="Zero value")
plot(buy_value, color=green, linewidth=2, title="Buy value")
plot(sell_value, color=red, linewidth=2, title="Sell value")
plot(e, color=red, linewidth=2, title="EMA spread 1")
plot(f, color=blue, linewidth=2, title="EMA spread 2")
I tried the code editor but the only result I get every time is errors so I have to remove the script again and get frustrated... After a day of work I hope someone can help me a bit in the good direction how to start with this simple code, maybe have a good similar example?

Best regards,

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - May 2024
Feedback and Announcements
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
41 thanks
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
21 thanks
  #2 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

it will help if you include a picture of what it looks like. dif between MAs is how MACD calculated so you can open NT MACD script, make a copy then modify it any way you want.

Reply With Quote
Thanked by:
  #3 (permalink)
 micasa001 
Amsterdam
 
Experience: Master
Platform: Own
Trading: Currency
Posts: 9 since Jul 2017
Thanks Given: 4
Thanks Received: 1



cory View Post
it will help if you include a picture of what it looks like. dif between MAs is how MACD calculated so you can open NT MACD script, make a copy then modify it any way you want.

Nice idea. Thanks. Let me start on that.

Started this thread Reply With Quote
  #4 (permalink)
 
forrestang's Avatar
 forrestang 
Chicago IL
 
Experience: None
Platform: Ninja, MT4, Matlab
Broker: CQG, AMP, MB, DTN
Trading: E/U, G/U
Posts: 1,329 since Jun 2010
Thanks Given: 354
Thanks Received: 1,047

LINK

Reply With Quote
Thanked by:




Last Updated on January 13, 2021


© 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