PureBytes Links
Trading Reference Links
|
Hi, Roy
I forward Pierre's reply to you. He suggests me to use Simulation.CurrentPosioinAge. I don't know what's return value of the first day's buy order generated? It should be 0, i think. But I can't confirm it.If so,I can use BarsSince(Buy order condition And Simulation.CurrentPosionAge=0). And it only solve the BarsSince() problem. But for the general using, I need "If there is alreay a buy order execuated, the second and third and so on will not be calcuated any more until the sell order execualted". But as I know Simulation function can't be used in expert real time,only can be used in system tester. That will be useless for me. Is that right? How to do it?
Thanks so much,
Eric,If you have MS 8, you can use function : Simulation.CurrentPositionAgeinstead of BarsSince function to easily resolve your problem.PierreRoy Larsen <rlarsen@xxxxxxxxxxxxxx> wrote:
EricYou need a simple latch. Create this indicator and drop it on your chartunscaled. It will display a pattern like the one below if the courier fontdoesn't get killed in sending. Study how this works and you have yoursolution. Substitute your own entry and exit signals and see what you think.Roy {Exercise 4} {signal timing for a simple latch}Set:=Cross(Mov(C,15,E),Mov(C,25,E)); Set+3.75;Reset:=Cross(Mov(C,25,E),Mov(C,15,E)); Reset+2.5;Init:=Cum(Set+Reset>-1)=1; Init+1.25;Trade:=BarsSince(Init OR Set)<BarsSince(Init OR Reset);Trade;_____/ \_____/\_______________/ \______ Set __N/A
___/\____________/ \________/\__ ResetN/A \________________________________ Init _________ ____N/A _______/ \______/ \___ Trade----- Original Message ----- From: "rans rundize" <happylifecanada@xxxxxxxxx>To: <Metastockusers@xxxxxxxxxxxxxxx>Cc: <Metastockusers-owner@xxxxxxxxxxxxxxx>Sent: Monday, November 17, 2003 7:43 PMSubject: [Metastockusers] barssince() problem> Dear all,>> I use barssince function to count the number of periods passed since thelast buy order is true. The problem is before the next sell order is true,there could be a chance to have another buy order condition true generatedbut is
ignored before the next sell order is genreated because I chooseonly one open position at all time. But the barsince() function is changedaccroding to the second buy order not first. I want the number of periodspassed since the first buy order. That is if there is a open order availablebut before the sell order is gernerated, any new buy order will be ingoredby the barssince() function. How to do it? I really appreciated.>> best regards,>> Eric>>> ---------------------------------> Do you Yahoo!?> Protect your identity with Yahoo! Mail AddressGuardTo unsubscribe from this group, send an email to:Metastockusers-unsubscribe@xxxxxxxxxxxYour use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
Yahoo! Groups Sponsor
ADVERTISEMENT
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|