Does anyone here have any idea why the Buy array would have a fractional value?
I did not assign any value to "Buy" except "Buy[0] = 0". I checked and the first "Buy" of the array was "0", the next ones were empty until the 11th, which was a little more than zero, and the rest had increasing values up to around "0.07".
Please advise..
By the way, this only happens when I put say:
Risk = EMA(ATR(10), 10);
If I only put:
Risk = ATR(10);
"Buy" is always "0".
If I put:
Risk = DEMA(ATR(10), 10);
"Buy" and "Sell" would both have fractional values.
Unfortunately your question isn't clear enough and does not provide all necessary details to give you an answer. Please follow this advice: How to ask a good question
Your user account isn't marked with License verified badge. Did you purchase AmiBroker license?
Only users with License verified badge are allowed to post on this forum.
So before posting, make sure you verify your license as explained here.
As can be seen above, every bar has a buy signal and some have sell signals too. When I scroll the chart, the sell signals appear and disappear.
I do not understand why this happens.
I have already verified my license. I have been using Amibroker for 4 years now.
Here are screenshots of a sample code and the chart where I applied it onto.
Your code is wrong. You must NOT use [0] in first assignment of Buy variable. The first assignment must be for entire array:
Buy = 0 ; // entire array
Sell = 0; // entire array