Hello,
could anyone help me?
i would like to represent in sequence, alternating, with the Plot the two point (Price[3] and Price1[3]) that respect the two conditions that were imposed.
I hope that someone can help me. I attached the first part of the code.
inputs: Price ( Low ), Price1 ( High ), RightStrenght ( 3 ) ;
vars: min1 ( 0 ), max1 ( 0 );
condition1 = Price[3]<Price[4] And Price[3]<Price[5] And Price[3]<Price[6] And Price[3]<Price[2] And
Price[3]<Price[1] And Price[3]<Price;
condition2 = Price1[3]>Price1[4] And Price1[3]>Price1[5] And Price1[3]>Price1[6] And
Price1[3]>Price1[2] And Price1[3]>Price1[1] And Price1[3]>Price1;
How to put in sequence this point?
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to put in sequence this point?
Can you draw a mock up of what you intended to see?Hello,
could anyone help me?
i would like to represent in sequence, alternating, with the Plot the two point (Price[3] and Price1[3]) that respect the two conditions that were imposed.
I hope that someone can help me. I attached the first part of the code.
inputs: Price ( Low ), Price1 ( High ), RightStrenght ( 3 ) ;
vars: min1 ( 0 ), max1 ( 0 );
condition1 = Price[3]<Price[4] And Price[3]<Price[5] And Price[3]<Price[6] And Price[3]<Price[2] And
Price[3]<Price[1] And Price[3]<Price;
condition2 = Price1[3]>Price1[4] And Price1[3]>Price1[5] And Price1[3]>Price1[6] And
Price1[3]>Price1[2] And Price1[3]>Price1[1] And Price1[3]>Price1;
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to put in sequence this point?
sorry if i post the code in the wrong way.
I would like to represent in the graph with the plot, points that stand for Price[3] and Price1[3];
i would like to put in sequence like this: Price[3], Price1[3], Price[3], Price1[3], Price[3], Price1[3], ecc.
I attached a figure of what i found with a code that i created. The problem is that i want to found the points alternating like i said. Price[3], Price1[3], Price[3], Price1[3]; instead i found the points mix each other. In the figure i connecting the dots to make an example of what points i want, and exclude the other that are between.
I would like to represent in the graph with the plot, points that stand for Price[3] and Price1[3];
i would like to put in sequence like this: Price[3], Price1[3], Price[3], Price1[3], Price[3], Price1[3], ecc.
I attached a figure of what i found with a code that i created. The problem is that i want to found the points alternating like i said. Price[3], Price1[3], Price[3], Price1[3]; instead i found the points mix each other. In the figure i connecting the dots to make an example of what points i want, and exclude the other that are between.
- Attachments
-
- MultiCharts1.png
- (35.35 KiB) Downloaded 694 times
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to put in sequence this point?
Tip #1:sorry if i post the code in the wrong way.
I would like to represent in the graph with the plot, points that stand for Price[3] and Price1[3];
i would like to put in sequence like this: Price[3], Price1[3], Price[3], Price1[3], Price[3], Price1[3], ecc.
I attached a figure of what i found with a code that i created. The problem is that i want to found the points alternating like i said. Price[3], Price1[3], Price[3], Price1[3]; instead i found the points mix each other. In the figure i connecting the dots to make an example of what points i want, and exclude the other that are between.
Get rid of those condition1 condition2...
nobody is going to weave through your convoluted logics to guess what you are trying to do.
Instead, give a meaningful name to the "condition1"... something that will lend meaning to the code, and let you follow the logic when you code and read... and help you in the inescapable debugging process.
Re: How to put in sequence this point?
Sorry, i know that i am a recruit, but if i delete the two conditions how can i represent what i want? Can you make an example of what you mean?
Re: How to put in sequence this point?
I attached the entire code so maybe it will be clearer.
Code: Select all
inputs: Price ( Low ), Price1 ( High ), RightStrenght ( 3 ) ;
vars: min1 ( 0 ), max1 ( 0 );
condition1 = Price[3]<Price[4] And Price[3]<Price[5] And Price[3]<Price[6] And Price[3]<Price[2] And Price[3]<Price[1] And Price[3]<Price;
condition2 = Price1[3]>Price1[4] And Price1[3]>Price1[5] And Price1[3]>Price1[6] And
Price1[3]>Price1[2] And Price1[3]>Price1[1] And Price1[3]>Price1;
if condition1 then
begin
min1 = Price[3];
Plot1[RightStrenght]( min1, "swing Low" );
end
else
min1=0;
NoPlot ( 1 );
if condition2 then
begin
max1 = Price1[3];
Plot2[RightStrenght]( max1, "swing High" );
end
else
max1=0;
min1 = 0;
NoPlot ( 1 );
NoPlot ( 2 );
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to put in sequence this point?
Ask yourself... What are you trying to achieve here? What are you trying to get out of the convoluted logic?::
condition1 = Price[3]<Price[4] And Price[3]<Price[5] And Price[3]<Price[6] And Price[3]<Price[2] And Price[3]<Price[1] And Price[3]<Price;
::
After you gave yourself the answer, then replace the word "condition1" with your answer.
You see, only you know the "answer"... everybody else reading the line is just guessing.
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to put in sequence this point?
If the line of logic gives you the swingpoint, then call it the swingpoint, why call it condition1 ???Mean you a swingpoint?
What is condition1 anyway? It is not a shampoo?
Re: How to put in sequence this point?
You are right. I call condition1 because i want, like a condition, that it was respected. The Price that i search must be less than the price of the previous three days and than of the price next three days ( in the case of LowPrice ); Price1 istead must be greater than the price of the price of the previous three days and than of the price next three days. For this i put the conditions. With the swing i don't know how to do this. For this i need some help.
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to put in sequence this point?
note: // <--- is this supposed to be a BEGIN END block?
[quote="gian9081"]
[quote="gian9081"]
Code: Select all
::
if condition1 then
begin
min1 = Price[3];
Plot1[RightStrenght]( min1, "swing Low" );
end
else // <--- is this supposed to be a BEGIN END block?
min1=0;
NoPlot ( 1 );
::
Re: How to put in sequence this point?
i put that because i think that if the condition1 wasn't met, then it must not be plot. I know that there are some problem with the "else", both in the first condition and the second. But i don't understand where i wrong and how to write it
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to put in sequence this point?
try this: (see // <-- added )i put that because i think that if the condition1 wasn't met, then it must not be plot. I know that there are some problem with the "else", both in the first condition and the second. But i don't understand where i wrong and how to write it
Code: Select all
//::
if swingpoint = true then // <-- changed name
begin
min1 = Price[3];
Plot1[RightStrenght]( min1, "swing Low" );
end
else
BEGIN // <-- added
min1=0;
NoPlot ( 1 );
END; // <-- added
//::
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: How to put in sequence this point?
I have to stop here. I will let others give you a hand.
I will be back later.
I will be back later.