Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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!
Can you help answer these questions from other members on NexusFi?
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.
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.
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.
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.
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.
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;