forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


Forex Software → Technical Indicators → mq4 to custom indicator for FSB

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 15

Topic: mq4 to custom indicator for FSB

Please,

Is it possible to convert this indicator to a custon indicator for FSB ?

It's a interresting indicator, it can help somebody for build strategy

Thanks

Douna

Post's attachments

Oscar.mq4 1.9 kb, 79 downloads since 2010-12-12 

You don't have the permssions to download the attachments of this post.

2 (edited by krog 2010-12-15 16:10:59)

Re: mq4 to custom indicator for FSB

Hi,
It seems like a Stochastic-type of indicator, oscillating between 0 and 100.
Try the attached, see if it matches what you were expecting.

Parameters:
Chart Style: you can choose Line or Histogram
Period: how many bars to use in Oscar calculation
Level: Level for indicator logic
Oscar Smoothing: moving average of the oscar indicator. For no smoothing, set to "1"

If you only want to see it, but not give signals, in Logic, choose last item "Draw Only, no Entry or Exit".

Please try it out, please advise if there are bugs. When we're mostly sure there are no bugs, will change name to "Oscar", with no number at the end.
--
Edit 12/15 -- removed Oscar 1.cs attachment, older version with bug.

Re: mq4 to custom indicator for FSB

Oh, one thing, forgot to add:
to match with the mq4 version, it looks like set period = 8 or 9, and Oscar smoothing = 1.
The mq4 has the period hard coded. I made it a parameter because I always like to change parameter values.

Re: mq4 to custom indicator for FSB

Hi Krog,

Thanks for your work..

I see the oscar.cs oscillate between 0 and 800, and when we generate a strategy, the maximum level permitt is 99.

Do you thing that its possible fix this on the .cs ?

Douna

5 (edited by krog 2010-12-17 20:46:45)

Re: mq4 to custom indicator for FSB

Hi Douna,
thanks for catching that, I forgot to check different pairs. Now should be 0 - 100.

Try the attached -- now it is Oscar 2. Please delete Oscar 1 on your computer, I'll remove from the post above.

I tried with FST and MT4. Set period to 8, then FST should match MT4. I don't know why, but the MT4 Oscar is hard-coded to 8.

Thanks for helping, let me know if you find more unexpected results, I'll try to fix them.

------
Edit 12/17 -- removed Oscar 2.cs due to bug.

6 (edited by douna 2010-12-16 13:45:18)

Re: mq4 to custom indicator for FSB

It's work ..

thanks you krog

Re: mq4 to custom indicator for FSB

great work, Krog! Can you tell what base price is Oscar C# using (open, close etc)?

I compared FSB/FST results, matches quite well, but indicator readings are a bit off, apparently that is the reason behind a few discrepant trades. Can you tell me how accurately the indicator measures the change in its value, for instance the reading in the first bar is 50.5555, in the second it's 50.5556, is this change big enough for generating a signal?

Re: mq4 to custom indicator for FSB

thanks, glad to help out.

Base Price: high, low and close. Pseudocode would look like this:

for (last period of bars) {   // set period in parameters. In original EA, it's always 8
  find highest high
  find lowest low }
roughOscar = (close - lowest) / (close - highest) * 100
oscar = ((previous oscar/3) * 2) + (roughOscar/3)

Discrepant trades: is this a different value between FST and FSB, or more like your example where the value is higher but no signal given?
I don't think that difference of .0001 is big enough to give a signal. Indicators have a built in technique to  correct for very small changes that should not be significant. I'm not 100% clear on it, and would defer to Mr Popov for an exact description. But here's my guess to explain:

For 50.5555, I'm assuming pips are at 2 decimals. So 50.5556 would mean a difference of 1/100th of a pip, or (50.5556 - 50.5555) = .0001, or .01 pips. The indicator usually requires more than half a pip to give a signal, or in this case, the change has to be greater than .005. Example, if the first value is 50.5526, the second value would have to be 50.5576 or higher to give a signal for "The indicator rises".

If the pip is at 4 decimals, then, I was just making it up with my guess tongue . I'd need your data and tell me what bar it's on, or some screen shots, and I'll have to take a look to find out if it's got a bug.

Re: mq4 to custom indicator for FSB

Hi,

do you thing that it's possible to convert this mq4 to a cs ?

in the original set up if that facilitates the programmation...

Thanks for your help,
Douna

Post's attachments

fx.mq4 7.82 kb, 36 downloads since 2010-12-17 

You don't have the permssions to download the attachments of this post.

Re: mq4 to custom indicator for FSB

krog wrote:

thanks, glad to help out.

Base Price: high, low and close. Pseudocode would look like this:

for (last period of bars) {   // set period in parameters. In original EA, it's always 8
  find highest high
  find lowest low }
roughOscar = (close - lowest) / (close - highest) * 100
oscar = ((previous oscar/3) * 2) + (roughOscar/3)

Discrepant trades: is this a different value between FST and FSB, or more like your example where the value is higher but no signal given?
I don't think that difference of .0001 is big enough to give a signal. Indicators have a built in technique to  correct for very small changes that should not be significant. I'm not 100% clear on it, and would defer to Mr Popov for an exact description. But here's my guess to explain:

For 50.5555, I'm assuming pips are at 2 decimals. So 50.5556 would mean a difference of 1/100th of a pip, or (50.5556 - 50.5555) = .0001, or .01 pips. The indicator usually requires more than half a pip to give a signal, or in this case, the change has to be greater than .005. Example, if the first value is 50.5526, the second value would have to be 50.5576 or higher to give a signal for "The indicator rises".

If the pip is at 4 decimals, then, I was just making it up with my guess tongue . I'd need your data and tell me what bar it's on, or some screen shots, and I'll have to take a look to find out if it's got a bug.


I think the issue is in discrepancy between FSB/FST, because every bar value is off, not much though but still affecting the result I think. I tested it on GBPUSD, .00001 it is. The difference is typically like this - 76.9610 vs 76.9778 (FSB/FST respectively), that's why I asked how big change triggers the signal, if the values would be in tenths (76.9) only, that would solve the problem I guess.

Screenshot, now the difference affects tenths as well:

http://s1.postimage.org/li082w90/Oscar2.jpg

Edit: there's difference between closing prices, that's our problem? something to do with broker's data feed?

Re: mq4 to custom indicator for FSB

I deleted Oscar 2 for looking for bug, but I don't think it has one. Find Oscar 3 attached, it should be the same thing.

What logic are you using in your screenshot?

Closing Prices: have to use the same data. Different values going in will give you different values coming out. Best to use the same data in both to be sure it's not from the data.

This might be another detail to check:
Bar Opening: FSB and FST will use the indicator value from the previous bar. Example: in your screen shot, the signal is given on 14:32 in FSB. If the logic is "The indicator falls", then it's comparing the Oscar values from 14:30 and 14:31. That one always gets me, because sometimes I'll see a signal on 14:32, but 14:31 has a lower value -- but then for Bar Opening, I'll remember I have to mouse over and check the Oscar values for 14:31 vs 14:30, then it's ok.

I think the issue is in discrepancy between FSB/FST, because every bar value is off, not much though but still affecting the result I think. I tested it on GBPUSD, .00001 it is. The difference is typically like this - 76.9610 vs 76.9778 (FSB/FST respectively), that's why I asked how big change triggers the signal, if the values would be in tenths (76.9) only, that would solve the problem I guess.

I'm sorry -- the values in the previous post, I thought they were the price, but I see actually you meant the Oscar values. For the Oscar values, I don't know. But to guess, I think the difference has to be greater than .00005, which we won't see because FSB and FST round to 4 decimals in the display.

Post's attachments

Oscar 3.cs 14.52 kb, 91 downloads since 2010-12-18 

You don't have the permssions to download the attachments of this post.

Re: mq4 to custom indicator for FSB

logic is "Changes direction", but the first problem is in prices, clearly visible in the screenshot, FST states close as .55696 versus FSB .55698, even volume differs, the data is the same but downloaded data differs from the actual live feed, it has to be broker's fault.

The price difference is only .00002, Oscar's value difference on the other hand ranges from .0168 to .153, that's a lot compared to .00002 or does it add up during calculations?

Re: mq4 to custom indicator for FSB

footon wrote:

logic is "Changes direction", but the first problem is in prices, clearly visible in the screenshot, FST states close as .55696 versus FSB .55698, even volume differs, the data is the same but downloaded data differs from the actual live feed, it has to be broker's fault.

The price difference is only .00002, Oscar's value difference on the other hand ranges from .0168 to .153, that's a lot compared to .00002 or does it add up during calculations?

Yes, certainly have to get the data to match first. I think that's about right for the difference -- consider that .00002 in the price is 20% of a pip. Since it's in the numerator and denominator, it could produce different results.

Re: mq4 to custom indicator for FSB

krog wrote:

I deleted Oscar 2 for looking for bug, but I don't think it has one. Find Oscar 3 attached, it should be the same thing.

What logic are you using in your screenshot?

Closing Prices: have to use the same data. Different values going in will give you different values coming out. Best to use the same data in both to be sure it's not from the data.

This might be another detail to check:
Bar Opening: FSB and FST will use the indicator value from the previous bar. Example: in your screen shot, the signal is given on 14:32 in FSB. If the logic is "The indicator falls", then it's comparing the Oscar values from 14:30 and 14:31. That one always gets me, because sometimes I'll see a signal on 14:32, but 14:31 has a lower value -- but then for Bar Opening, I'll remember I have to mouse over and check the Oscar values for 14:31 vs 14:30, then it's ok.

I think the issue is in discrepancy between FSB/FST, because every bar value is off, not much though but still affecting the result I think. I tested it on GBPUSD, .00001 it is. The difference is typically like this - 76.9610 vs 76.9778 (FSB/FST respectively), that's why I asked how big change triggers the signal, if the values would be in tenths (76.9) only, that would solve the problem I guess.

I'm sorry -- the values in the previous post, I thought they were the price, but I see actually you meant the Oscar values. For the Oscar values, I don't know. But to guess, I think the difference has to be greater than .00005, which we won't see because FSB and FST round to 4 decimals in the display.

Can you make this compatible with Ninjatrader 7?

Re: mq4 to custom indicator for FSB

buzzsaw wrote:

Can you make this compatible with Ninjatrader 7?

Wrong forum, mate.

Posts: 15

Pages 1

You must login or register to post a reply

Forex Software → Technical Indicators → mq4 to custom indicator for FSB

Similar topics in this forum