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)
How to refer to two BollingerBands in Multicharts while creating a signal?
I want to create a signal using easylanguage. I need two Bollinger Bands with 1Std Dev and 2Std Dev, but I just can't seem to write the right code for it. I would be grateful for any help. Thanks.
Can you help answer these questions from other members on NexusFi?
post the code that it is giving you trouble and someone might be able to steer you in the right direction.
A good start would be to take a look at the build in Bollinger Band strategies or indicators. Then simply use the code that calls/operates the Bollinger Bands twice within your code - each with its own set of variables and inputs.
On a separate matter you might want to help @Big Mike in keeping the forum orderly by not creating double posts for the same problem :
I want to create a signal using easylanguage. I need two Bollinger Bands with 1Std Dev and 2Std Dev, but I just cant seem to write the right code for it. I would be grateful for any help. Thanks.
Condition1 = CurrentBar > 1 and
TestPriceLBand crosses above var0
and TestPriceLBand1 crosses below var2
and marketposition <> 1;
if condition1 then begin
Buy ( "L" ) next bar at var1 stop ;
end;
Condition2 = CurrentBar > 1 and
TestPriceUBand crosses below var1
and TestPriceUBand1 crosses above var3
and marketposition <>-1 ;
if condition1 then begin
Sell Short ( "S" ) next bar var1 stop ;
end;
i am a beginner so please be easy on the mistakes. Thanks.
if i am not wrong, this is the default code available in multicharts. I tried to edit that to suit my purpose i.e. creating two BB but couldn't. thanks.
think about it like this, you try to explain the exact rules that lead to an entry to someone who is not familiar with your system. After your explanation he/she should be able to trade it exactly like you do now.
The term "for trading between these ranges" might be too vague. When should the entry be triggered exactly, when would an exit be triggered etc..
TJ made some good points that are helpful in describing what a system should do in the official MC forum. Check them out, as they might help.
Method:
• Long- When Close goes beyond BB1 Lower Band then go long.
• Long Exit- Stoploss-When low goes below BB2 lower band then exit long position.
• Short- When Close goes above BB1 Higher Band then go short.
• Short Exit- Stoploss- When high goes above BB2 higher band then exit short position.
this is the best explanation i can give about what i want with the system. the code is getting compiled but not giving any signals on the chart.
I would suggest to start with fixing your entry. Check your entry conditions. Did you write them like you want them per your description or do you maybe check that both bollinger bands have to be crossed or something else maybe?
In both above examples, conditions starts with following:
Condition = CurrentBar > 1 and
Would someone please explain why these conditions starts with
currentBar > 1
Thanks a lot,