NexusFi: Find Your Edge


Home Menu

 





Easylanguage help needed, from signal to function


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one jjsshh with 7 posts (0 thanks)
    2. looks_two ABCTG with 6 posts (3 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 wldman with 1 posts (2 thanks)
    1. trending_up 3,943 views
    2. thumb_up 5 thanks given
    3. group 3 followers
    1. forum 14 posts
    2. attach_file 0 attachments




 
Search this Thread

Easylanguage help needed, from signal to function

  #1 (permalink)
jjsshh
Helsinki, Finland
 
Posts: 23 since Dec 2013
Thanks Given: 14
Thanks Received: 4

Hi,

i'm having hard time by trying to change ela signals reserved words to a form which can be used inside a function. For example how to change barssinceentry or a beginprice to a form that can be used in a function. The mission is to plot the signal with indicator by using a function form of signal. For example, if long then indicator is 1.. Thanks in advance!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
REcommedations for programming help
Sierra Chart
Quant vue
Trading Reviews and Vendors
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
 
  #3 (permalink)
 
wldman's Avatar
 wldman 
Chicago Illinois USA
Legendary Market Wizard
 
Experience: Advanced
Broker: IB, ToS
Trading: /ES, US Equities/Options
Frequency: Several times daily
Duration: Hours
Posts: 3,531 since Aug 2011
Thanks Given: 2,064
Thanks Received: 9,552


there is a thread for that. I s something like "Want your easylanguage...for free". You should try there instead of making a new thred that is personal to just you. LOTS of VERY keen advice available in that thread.

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

jjsshh,

what are you trying to accomplish with that function? Your code uses several reserved words that are only available in signals. On top of that orders can't be send from functions. For any one to be able to help you need to elaborate more on what the result should be in my opinion.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
jjsshh
Helsinki, Finland
 
Posts: 23 since Dec 2013
Thanks Given: 14
Thanks Received: 4

wldman got the point, the first post was stupid and I will change it.

ABCTG I'm trying to plot it via indicator.

Reply With Quote
  #6 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


jjsshh View Post
ABCTG I'm trying to plot it via indicator.

jjsshh,

what exactly are you trying to plot? It's probably perfectly clear for you what you want, but a second person might
have a hard time understanding what you want when you only provide limited information.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #7 (permalink)
jjsshh
Helsinki, Finland
 
Posts: 23 since Dec 2013
Thanks Given: 14
Thanks Received: 4

ABCTG i'm trying to plot the signal with indicator which uses function. For example if signal is long then the indicator is 1 and when out of the markets indicator is 0. And yes, the problem is with those reserved words.

Reply With Quote
  #8 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

If you could post the code again I will see if I can help you a bit (wrap code tags around it, so it's better to distinguish from the text).
In general you need a variable that keeps track of the changes in the marketposition. You will also need variables keeping tracks of your stops and prices where you'd enter. You can also post the code you already have done so far and I'll try to steer you into the right direction.

Regards,
ABCTG


jjsshh View Post
ABCTG i'm trying to plot the signal with indicator which uses function. For example if signal is long then the indicator is 1 and when out of the markets indicator is 0. And yes, the problem is with those reserved words.


Follow me on Twitter Reply With Quote
  #9 (permalink)
jjsshh
Helsinki, Finland
 
Posts: 23 since Dec 2013
Thanks Given: 14
Thanks Received: 4

Here is the code. as said entcondl and entconds are true/false vars and MMStop, targfr and avetr are inputs.
///////////////////////////////////////////////////////////////


{ Entry orders }
If MarketPosition = 0 and EntCondL then begin
Buy next bar at market;
end;

If MarketPosition = 0 and EntCondS and EntCondL = false then begin
Sell short next bar at market;
end;

{ Exit orders, long trades }
If MarketPosition = 1 then begin
If BarsSinceEntry = 0 then begin
LStop = (1 - MMStopPct/100.0) * EntryPrice;
end;

Sell("ExStop-L") next bar at LStop stop;

TargPrL = EntryPrice + TargFr * AveTR;
Sell("ExTarg-L") next bar at TargPrL limit;
end;

{ Exit orders, short trades }
If MarketPosition = -1 then begin
If BarsSinceEntry = 0 then begin
SStop = (1 + MMStopPct/100.0) * EntryPrice;
end;

Buy to cover("ExStop-S") next bar at SStop stop;

TargPrS = EntryPrice - TargFr * AveTR;
Buy to cover("ExTarg-S") next bar at TargPrS limit;
end;

Reply With Quote
  #10 (permalink)
jjsshh
Helsinki, Finland
 
Posts: 23 since Dec 2013
Thanks Given: 14
Thanks Received: 4


This is what i have tried. It doesn't work at all. Indicatvalue is the name of function and is used via indicator.


///////////////////////////

switch(mpos)
begin

case 0:
if entcondl then begin
Lstop = (1-MMstoppct/100)*Open;
TargPrl = Open*TargFr*AveTR;
mpos=1;
end;


if entcondl=false and entconds then begin

mpos=-1;
SStop = (1 + MMStopPct/100.0) * open;
TargPrS = open - TargFr * AveTR;
end;

end;

case 1:
if close<= Lstop or close>= targprl then mpos=0;

case -1:
if close>=Sstop or close<=targprs then mpos=0;

end;

indicatvalue = mpos;

Reply With Quote




Last Updated on August 5, 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