Check open price of bar where chart show arrow on chart  [SOLVED]

Questions about MultiCharts and user contributed studies.
faraz
Posts: 137
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 55 times

Check open price of bar where chart show arrow on chart

Postby faraz » 02 Dec 2012

Hi,

What is the way to check open price of bar where chart show Buy/SellShort Arrow on chart.

These functions I tried but no luck;
Marketposition, barsSinceEntry, EntryPrice, barsSinceEntry (it skip orders which are entered and exited on same bar through setstoploss)

Awaiting

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Re: Check open price of bar where chart show arrow on chart

Postby TJ » 02 Dec 2012

faraz wrote:Hi,

What is the way to check open price of bar where chart show Buy/SellShort Arrow on chart.

These functions I tried but no luck;
Marketposition, barsSinceEntry, EntryPrice, barsSinceEntry (it skip orders which are entered and exited on same bar through setstoploss)

Awaiting

Just saying "no luck" is not enough.
Please give detail. How did you "tried"?

faraz
Posts: 137
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 55 times

Re: Check open price of bar where chart show arrow on chart

Postby faraz » 02 Dec 2012

TJ wrote:Just saying "no luck" is not enough.
Please give detail. How did you tried?


Code: Select all

if Average(C,10) cross above Average(C,20) then Buy next bar o stop;
setstoploss(1);

Print(ElDateToString(d)," ",BarsSinceEntry," ",EntryDate," ",i_MarketPosition," ",marketposition);


Run it on any market and watch entries which are Entry + Stop out on same bar and see if u can find a way to identify those entries in print command.

Thanks

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Re: Check open price of bar where chart show arrow on chart

Postby TJ » 02 Dec 2012

faraz wrote:
TJ wrote:Just saying "no luck" is not enough.
Please give detail. How did you tried?


Code: Select all

if Average(C,10) cross above Average(C,20) then Buy next bar o stop;
setstoploss(1);

Print(ElDateToString(d)," ",BarsSinceEntry," ",EntryDate," ",i_MarketPosition," ",marketposition);


Run it on any market and watch entries which are Entry + Stop out on same bar and see if u can find a way to identify those entries in print command.

Thanks

Please post the print out sample.

I do not test codes that are incomplete.

faraz
Posts: 137
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 55 times

Re: Check open price of bar where chart show arrow on chart

Postby faraz » 02 Dec 2012

TJ wrote:Please post the print out sample.

I do not test codes that are incomplete.


a) Check attached print log.
b) check attached pic 10/16/2009 entry which got stop out on same bar, Print log is unable to identify.

Awaiting
Attachments
print.txt
(210.04 KiB) Downloaded 60 times
untitled.PNG
untitled.PNG (105.76 KiB) Viewed 321 times

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Re: Check open price of bar where chart show arrow on chart

Postby TJ » 02 Dec 2012

you have setstoploss(1),

what are you trying to achieve?

faraz
Posts: 137
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 55 times

Re: Check open price of bar where chart show arrow on chart

Postby faraz » 02 Dec 2012

TJ wrote:you have setstoploss(1),

what are you trying to achieve?


I used setstoploss(1) to generate more such orders for better understanding of the problem. Actually the setstoploss amount is bit higher.

Awaiting

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Re: Check open price of bar where chart show arrow on chart

Postby TJ » 02 Dec 2012

faraz wrote:
TJ wrote:you have setstoploss(1),

what are you trying to achieve?


I used setstoploss(1) to generate more such orders for better understanding of the problem. Actually the setstoploss amount is bit higher.

Awaiting

see post #2

faraz
Posts: 137
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 55 times

Re: Check open price of bar where chart show arrow on chart

Postby faraz » 02 Dec 2012

TJ wrote:see post #2


Just saying "no luck" is not enough.
Please give detail. How did you "tried"?


This one? What u want me to see in it?

User avatar
TJ
Posts: 6586
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 971 times
Been thanked: 1907 times

Re: Check open price of bar where chart show arrow on chart

Postby TJ » 02 Dec 2012

faraz wrote:
TJ wrote:see post #2


Just saying "no luck" is not enough.
Please give detail. How did you "tried"?


This one? What u want me to see in it?

If you want help, you have to provide more detail of project.
I cannot help you with what you have given. Maybe someone else can.


You can help yourself with the FAQ:
viewtopic.php?f=16&t=10811

faraz
Posts: 137
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 55 times

Re: Check open price of bar where chart show arrow on chart

Postby faraz » 02 Dec 2012

TJ wrote:If you want help, you have to provide FULL detail of project.
I cannot help you with what you have given. Maybe someone else can.


You can check out the FAQ:
viewtopic.php?f=16&t=10811



Its a 100% complete strategy. I would have provided u FULL details of project if my strategy is not 100% complete and some of its portion requires coding, which is not in this case. But still if u think it is incomplete then plz u ignore this inquire, I will wait for some one else to reply on it.

Thanks

User avatar
Henry MultiСharts
Posts: 8514
Joined: 25 Aug 2011
Has thanked: 1213 times
Been thanked: 2733 times

Re: Check open price of bar where chart show arrow on chart  [SOLVED]

Postby Henry MultiСharts » 05 Dec 2012

Hello Faraz,

Please try this code:

Code: Select all

if Average(C,10) cross above Average(C,20) then Buy next bar o stop;
setstoploss(1);

if EntryDate(1)=Date and EntryTime(1)=Time and marketposition=0 then
print(currentbar+maxbarsback);
These users thanked the author Henry MultiСharts for the post:
faraz

faraz
Posts: 137
Joined: 25 Feb 2011
Has thanked: 26 times
Been thanked: 55 times

Re: Check open price of bar where chart show arrow on chart

Postby faraz » 05 Dec 2012

Henry MultiСharts wrote:Hello Faraz,

Please try this code:

Code: Select all

if Average(C,10) cross above Average(C,20) then Buy next bar o stop;
setstoploss(1);

if EntryDate(1)=Date and EntryTime(1)=Time and marketposition=0 then
print(currentbar+maxbarsback);



wahoo, it worked, amazing,,,

Thank you.


Return to “MultiCharts”