NexusFi: Find Your Edge


Home Menu

 





Need Help EasyLanguage Coding


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one StockT8er with 10 posts (1 thanks)
    2. looks_two vmodus with 6 posts (2 thanks)
    3. looks_3 kinkeadfx with 3 posts (0 thanks)
    4. looks_4 ABCTG with 2 posts (0 thanks)
    1. trending_up 4,589 views
    2. thumb_up 5 thanks given
    3. group 5 followers
    1. forum 21 posts
    2. attach_file 4 attachments




 
Search this Thread

Need Help EasyLanguage Coding

  #1 (permalink)
 
kinkeadfx's Avatar
 kinkeadfx 
Amarillo, Texas, USA
 
Experience: Advanced
Platform: Ninjatrader, Multicharts
Broker: Amp Futures/CQG
Trading: YM 6E CL GC
Posts: 29 since Oct 2010
Thanks Given: 11
Thanks Received: 1

I am needing help coding a signal in easylanguage.
What i want is when you enable the signal:

Inputs would be ticks entryoffset and SessionTimes.

If the market moves up 10 price ticks it will Buy.
If the market moves down 10 price ticks it will Sell.

Pretty simple just need help with coding.

Thanks!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623


kinkeadfx,

post the code you need help with and I'll see if I can steer you into the right direction.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
  #4 (permalink)
 
kinkeadfx's Avatar
 kinkeadfx 
Amarillo, Texas, USA
 
Experience: Advanced
Platform: Ninjatrader, Multicharts
Broker: Amp Futures/CQG
Trading: YM 6E CL GC
Posts: 29 since Oct 2010
Thanks Given: 11
Thanks Received: 1

Here is what i have so far. I can not find any examples for what i am looking for.

inputs: ?

//enter position (only at the close of bar):

if barstatus(1) = 2 then begin

if marketposition = 0 and condition1 then
buy("enter long") next bar 1 contracts at close limit;
longentryprice = entryprice;

if marketposition = 0 and condition2 then
sellshort ("enter short") next bar 1 contracts at close limit;
shortentryprice = entryprice;

end;

Started this thread Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

Where do you check for the 10 tick move and what are condition1 and condition2 doing?
When you enable the strategy you can either save the current price and use this to trigger market orders when price moves higher or lower by 10 ticks.
Or you could send your limit orders right away using a limit price as close +/- 10 ticks.
Once one order is filled, you could kill the other or leave it depending on your needs.

Regards,
ABCTG


kinkeadfx View Post
Here is what i have so far. I can not find any examples for what i am looking for.

inputs: ?

//enter position (only at the close of bar):

if barstatus(1) = 2 then begin

if marketposition = 0 and condition1 then
buy("enter long") next bar 1 contracts at close limit;
longentryprice = entryprice;

if marketposition = 0 and condition2 then
sellshort ("enter short") next bar 1 contracts at close limit;
shortentryprice = entryprice;

end;


Follow me on Twitter Reply With Quote
  #6 (permalink)
 
kinkeadfx's Avatar
 kinkeadfx 
Amarillo, Texas, USA
 
Experience: Advanced
Platform: Ninjatrader, Multicharts
Broker: Amp Futures/CQG
Trading: YM 6E CL GC
Posts: 29 since Oct 2010
Thanks Given: 11
Thanks Received: 1

What i would like to do is set them up like multicharts has them.
Have a signal for LE and another for SE.
I already use stops and targets signal.

Could you possibly code the first one for me and i could code the other one that way i can see how to put the code together for myself.

Started this thread Reply With Quote
  #7 (permalink)
 StockT8er 
ROY, Utah
 
Experience: Intermediate
Platform: TradeStation
Posts: 81 since Apr 2020
Thanks Given: 11
Thanks Received: 6

OK, i want to create 2 different DEMA to interact with each other. How do I do this.
1st - with the length of 9
2nd - with the length of 12

Reply With Quote
  #8 (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


StockT8er View Post
OK, i want to create 2 different DEMA to interact with each other. How do I do this.
1st - with the length of 9
2nd - with the length of 12

What do you mean by 'interact with each other'? If you are just looking at indicators, then put two DEMA studies on the chart at the same time, with the different lengths on each indicator. Change the color for one so it is easier to tell the difference.

~vmodus

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #9 (permalink)
 StockT8er 
ROY, Utah
 
Experience: Intermediate
Platform: TradeStation
Posts: 81 since Apr 2020
Thanks Given: 11
Thanks Received: 6

I'm working with strategies, having them in different studies they do not talk to each other. However I figured that part out now I just need to formulate this formula into EasyLanguage

def isNaNaPrice = IsNaN(Cprice);
def AvarLength = Sum(!isNaNaPrice, DMAH_length);
def AvarSum = Sum(if isNaNaPrice then 0 else Cprice, DMAH_length);

plot DMA = if IsNaN(Cprice[1]) or AvarLength == 0 then Double.NaN else AvarSum / AvarLength;
DMA.DefineColor("Displaced", CreateColor(0, 30, 30)); #Lt.Gray
DMA.DefineColor("Effective", GetColor(5));
DMA.AssignValueColor(if isNaNaPrice then DMA.Color("Effective") else DMA.Color("Displaced"));
DMA.SetStyle(Curve.SHORT_DASH);

Reply With Quote
  #10 (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



StockT8er View Post
I'm working with strategies, having them in different studies they do not talk to each other. However I figured that part out now I just need to formulate this formula into EasyLanguage

def isNaNaPrice = IsNaN(Cprice);
def AvarLength = Sum(!isNaNaPrice, DMAH_length);
def AvarSum = Sum(if isNaNaPrice then 0 else Cprice, DMAH_length);

plot DMA = if IsNaN(Cprice[1]) or AvarLength == 0 then Double.NaN else AvarSum / AvarLength;
DMA.DefineColor("Displaced", CreateColor(0, 30, 30)); #Lt.Gray
DMA.DefineColor("Effective", GetColor(5));
DMA.AssignValueColor(if isNaNaPrice then DMA.Color("Effective") else DMA.Color("Displaced"));
DMA.SetStyle(Curve.SHORT_DASH);

I don't know this origin language. If you can put it in plain English or pseudocode, then maybe I can help.

Also: are you using two charts, or just one chart with two different DEMA calculations?

~vmodus

~vmodus

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




Last Updated on September 28, 2020


© 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