Topic: Two Bars Action
hello
i tried to made some modifications to build a simple two bars action but iam completely stucked in the calculation part
attached the indicator , any one can help to make it works
Thanks in advance
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Technical Indicators → Two Bars Action
hello
i tried to made some modifications to build a simple two bars action but iam completely stucked in the calculation part
attached the indicator , any one can help to make it works
Thanks in advance
You are almost there.
All these blocks:
for (int iBar = iPrvs + 1; iBar < Bars; iBar++)
{
Close[bar - 1] > Close[bar - 2] ? 1 : 0;
Close[bar - 1] > Close[bar - 2] ? 1 : 0;
}
Must be:
for (int bar = iPrvs + 1; bar < Bars; bar++)
{
Component[1].Value[bar] = Close[bar - 1] > Close[bar - 2] ? 1 : 0;
Component[2].Value[bar] = Close[bar - 1] > Close[bar - 2] ? 1 : 0;
}
Note iBar changed to bar
Many Thanks Pop
I modified the mentioned parts in previous post
But still cannot modify the start of calculate part
How to change this part from volume to fit to the two bars indicator
public override void Calculate(IDataSet dataSet)
{
DataSet = dataSet;
// Reading the parameters
int iPrvs = IndParam.CheckParam[0].Checked ? 1 : 0;
// Calculation
double[] adVolumes = new double[Bars];
int iFirstBar = iPrvs + 1;
for (int iBar = 0; iBar < Bars; iBar++)
{
adVolumes[iBar] = Volume[iBar];
}
And this
Component[0].Value = adVolumes;
Ahmed, explain more, make a drawing or something, don't understand nothing.
i am trying to modify the volumes indicator into two price action indicator
the idea is compare OHLC to OHLC of previous bar but iam stucked when i wanted to change volume variable to in the beginning of calculation block
You want to compare volume of previous bars?
no i need to use High , open , Low and close instead of volume
hello footon
attached here the simple version of the indicator i need.
i used only high value , but what i need to include ohlc values in one indicator to save slots '' max are 8 ''
Ok, this makes more sense. The first indi you posted - you do not need calculation block at all (if you want fancy chart action, then you'll need it). As far as I saw signal calculation takes place in the Calculation of the logic part.
One other interesting thing I noticed - your logics give buy and sell signals at the same time, is it intentional?
Ok, this makes more sense. The first indi you posted - you do not need calculation block at all (if you want fancy chart action, then you'll need it). As far as I saw signal calculation takes place in the Calculation of the logic part
how to make it without calculation part !!!! could you modify the 1st indicator please
Have you checked the signals? Are they to your liking?
You can leave it as it is, what you see in the histogram is some daft values, but they don't interfere with the trading signals indi gives, you have to check the signals and go on from there.
One other interesting thing I noticed - your logics give buy and sell signals at the same time, is it intentional?
How is that !!!! the idea of the indicator to be undirectional not giving signals alone it needs other indicator or opening point that trigger entry !!!!
Could you elaborate more
Yep, it is intentional then.
the idea of the indicator to be undirectional not giving signals alone it needs other indicator or opening point that trigger entry!
That's exactly how it is going to work, when FSB sees 2 opposite signals, it won't open a position unless there is a third directional signal. It's all ok
Yep, it is intentional then.
ahmedalhoseny wrote:the idea of the indicator to be undirectional not giving signals alone it needs other indicator or opening point that trigger entry!
That's exactly how it is going to work, when FSB sees 2 opposite signals, it won't open a position unless there is a third directional signal. It's all ok
loooooooooooooool so kindly may you modify the 1st indicator
Modify what?
Two bars indicator its not working !!!
Two bars indicator its not working !!!
Could you elaborate more on that? From what you say it's not working?
it cannot load
see attached pic
Delete the for loop in the calc block, put only a number for the iFirstBar, component numbers are fine?
Second option - find a working custom indi, copy/paste logic parameter, logic calculation block and description block and it works, it did for me anyway, has to work for you, too.
Forex Software → Technical Indicators → Two Bars Action
Powered by PunBB, supported by Informer Technologies, Inc.