Spot the code error in afl please. - AmiBroker | futures io social day trading
futures io futures trading


Spot the code error in afl please.
Updated: Views / Replies:964 / 17
Created: by milkysahai001 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Spot the code error in afl please.

  #1 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts, AmiBroker
Favorite Futures: Stock Futures
 
Posts: 39 since Sep 2016
Thanks: 14 given, 3 received

Spot the code error in afl please.

I am trying to code signals based on my own indicator, but the indicators are overlapping throughout on the chart. The formula for them is totally different but the values are coming same. Also there is no problem in compiling the afl. Can somebody point out the error in my code?

Vclose = 0;
Vclose = (Om+Hm+Lm+Cm)/4;
Vopen = 0;
Value1 = IIf (Ref (vOpen, -1) > 0, Ref(vOpen, -1), vClose);
Vopen = ((value1) + smooth * ( vClose - value1));

the values of vClose and vOpen should not come the same.
Please consider that I am newbie in afl coding.

Reply With Quote
 
  #2 (permalink)
Membership Temporarily Revoked
Zurich/Switzerland
 
Futures Experience: Advanced
Platform: -
Favorite Futures: -
 
Posts: 79 since Oct 2014
Thanks: 0 given, 33 received

First of all your code is incomplete.
Secondly do you realize that you have assigned zero to Vopen and Vclose?

Reply With Quote
 
  #3 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts, AmiBroker
Favorite Futures: Stock Futures
 
Posts: 39 since Sep 2016
Thanks: 14 given, 3 received


Prouser,

Yes I know the code is incomplete. it is the part in which the error is.
I assigned zero to vOpen and vClose as it was asking to initialize them.

Reply With Quote
 
  #4 (permalink)
Elite Member
Toronto Canada
 
Futures Experience: Intermediate
Platform: ninjatrader
Favorite Futures: es
 
mmaker's Avatar
 
Posts: 353 since Feb 2011
Thanks: 1,169 given, 392 received

what the heck is afl

Answer
This post has been selected as an answer to the original posters question Answer


milkysahai001 View Post
I am trying to code signals based on my own indicator, but the indicators are overlapping throughout on the chart. The formula for them is totally different but the values are coming same. Also there is no problem in compiling the afl. Can somebody point out the error in my code?

Vclose = 0;
Vclose = (Om+Hm+Lm+Cm)/4;
Vopen = 0;
Value1 = IIf (Ref (vOpen, -1) > 0, Ref(vOpen, -1), vClose);
Vopen = ((value1) + smooth * ( vClose - value1));

the values of vClose and vOpen should not come the same.
Please consider that I am newbie in afl coding.

i dont have a clue what afl is but i can tell you what is happening with your logic....

the then part of your if statement is never executed.
Only the else branch is executed.
Hence Value 1 always equals the close.
Therefore vClose - value1 equals zero in the last line.....
Therefore smooth * ( vClose - value1)); goes to zero and you are left with.....
Vopen = ((value1)
and since value 1 equals the close....denoted as vClose....
Vopen equals vClose

so what the heck is afl?


Look at your raw data going into this logic and walk thru your code with the raw data.

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts, AmiBroker
Favorite Futures: Stock Futures
 
Posts: 39 since Sep 2016
Thanks: 14 given, 3 received


mmaker View Post
i dont have a clue what afl is but i can tell you what is happening with your logic....

the then part of your if statement is never executed.
Only the else branch is executed.
Hence Value 1 always equals the close.
Therefore vClose - value1 equals zero in the last line.....
Therefore smooth * ( vClose - value1)); goes to zero and you are left with.....
Vopen = ((value1)
and since value 1 equals the close....denoted as vClose....
Vopen equals vClose

so what the heck is afl?


Look at your raw data going into this logic and walk thru your code with the raw data.

mmaker,

afl is amibroker formula language, used for coding algorithm which can run in amibroker trading platform.
thanks for your input. i will trying doing what you suggested.

Reply With Quote
 
  #6 (permalink)
Membership Temporarily Revoked
Zurich/Switzerland
 
Futures Experience: Advanced
Platform: -
Favorite Futures: -
 
Posts: 79 since Oct 2014
Thanks: 0 given, 33 received


milkysahai001 View Post
Prouser,

Yes I know the code is incomplete. it is the part in which the error is.
I assigned zero to vOpen and vClose as it was asking to initialize them.

Are you trying to translate from a different language?
Are you trying to create Heikin Ashi?
You should provide more info on what you are trying to achieve because right now your code doesn't make much sense.

Reply With Quote
The following user says Thank You to prouser for this post:
 
  #7 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts, AmiBroker
Favorite Futures: Stock Futures
 
Posts: 39 since Sep 2016
Thanks: 14 given, 3 received


prouser View Post
Are you trying to translate from a different language?
Are you trying to create Heikin Ashi?
You should provide more info on what you are trying to achieve because right now your code doesn't make much sense.


Prouser,

Yes I am trying to create Heikin Ashi. for that i need to get the modified prices for which I am writing the mentioned afl. I coded it in easy language for multicharts but not able to go on with afl because of this glitch.

Reply With Quote
 
  #8 (permalink)
Membership Temporarily Revoked
Zurich/Switzerland
 
Futures Experience: Advanced
Platform: -
Favorite Futures: -
 
Posts: 79 since Oct 2014
Thanks: 0 given, 33 received


mmaker View Post
what the heck is afl
...
i dont have a clue what afl is
...
so what the heck is afl?

You have 300 posts and are member since 2011 and you are still unable to look at the link at the top which is clearly showing to you that you are in AmiBroker discussion area?

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Are you trolling?

Anyway with upper easy simple platform info are you still unable to use search engines? Really?
https://lmgtfy.com/?q=AmiBroker+AFL


Last edited by prouser; November 24th, 2016 at 05:39 AM.
Reply With Quote
The following user says Thank You to prouser for this post:
 
  #9 (permalink)
Membership Temporarily Revoked
Zurich/Switzerland
 
Futures Experience: Advanced
Platform: -
Favorite Futures: -
 
Posts: 79 since Oct 2014
Thanks: 0 given, 33 received


milkysahai001 View Post
Prouser,

Yes I am trying to create Heikin Ashi. for that i need to get the modified prices for which I am writing the mentioned afl. I coded it in easy language for multicharts but not able to go on with afl because of this glitch.

There are Heikin Ashi AFLs on the Internet.

Reply With Quote
 
  #10 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts, AmiBroker
Favorite Futures: Stock Futures
 
Posts: 39 since Sep 2016
Thanks: 14 given, 3 received



prouser View Post
There are Heikin Ashi AFLs on the Internet.


Prouser,

I am looking for them. Thanks.

Reply With Quote

Reply



futures io > > > > Spot the code error in afl please.

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

FuturesTrader71: TBA

Elite only

Al Brooks: TBA

Elite only

Jigsaw Trading: TBA

Oct 19

RandBots: TBA

Oct 24
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
AFL Error 61 Jacare AmiBroker 2 March 23rd, 2016 09:55 AM
Need afl venkatbabu AmiBroker 1 June 1st, 2014 10:27 AM
need Amibroker afl venkatbabu AmiBroker 2 May 29th, 2014 08:31 AM
joeHAOindicator fails to compile with error code cs0542 joemiller NinjaTrader Programming 2 May 27th, 2013 03:21 PM
Help with code error kashter NinjaTrader Programming 10 March 8th, 2011 11:16 AM


All times are GMT -4. The time now is 10:44 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-09-26 in 0.14 seconds with 39 queries on phoenix via your IP 54.144.21.195