Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 677 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Define Exit Parameters inside entry #475957
01/15/19 14:12
01/15/19 14:12
Joined: Oct 2018
Posts: 70
AZ
C
chsmac85 Offline OP
Junior Member
chsmac85  Offline OP
Junior Member
C

Joined: Oct 2018
Posts: 70
AZ
How would we code entering a trade on a SMA cross (trivial) and exit on an SMA cross for that given trade?

Would it be enterLong(exitLong(price=my_exit_price))?

And then define int my_exit_price = SMA(Price)?

Re: Define Exit Parameters inside entry [Re: chsmac85] #475966
01/15/19 18:59
01/15/19 18:59
Joined: Feb 2017
Posts: 369
D
Dalla Offline
Senior Member
Dalla  Offline
Senior Member
D

Joined: Feb 2017
Posts: 369
Check the tutorials in the manual

Re: Define Exit Parameters inside entry [Re: Dalla] #475969
01/16/19 02:38
01/16/19 02:38
Joined: Oct 2018
Posts: 70
AZ
C
chsmac85 Offline OP
Junior Member
chsmac85  Offline OP
Junior Member
C

Joined: Oct 2018
Posts: 70
AZ
You have to realize how that's a 1) completely insulting and 2) completely unhelpful response to a forum post.

I have gone through all of the tutorials, I have bought JCL's book and read it cover to cover and I haven't found my answer.

Why even take the time to post a response that does absolutely nothing but show your superiority? How do you expect to build a community or more importantly a user base for the software when you treat your user base poorly?

There's an entire thread on "why isn't Zorro more popular" and the easiest answer I have for you guys is because the community doesn't make it easy to use. The tutorials you love to discuss do not make sense to non coders. I'm sorry that I'm not fluent in C and that I am an hobbyist. That was my understanding was the target audience. Your beloved tag line of take money from the rich and give it to the poor. Only if the poor are expert coders.
This message board is not helpful at all.

Re: Define Exit Parameters inside entry [Re: chsmac85] #475986
01/16/19 15:33
01/16/19 15:33
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
https://zorro-project.com/manual/en/tutorial_var.htm

You will get help if you do at least some "homework".

Instead of speculating (as above), just try to code your idea yourself, try really hard and spend a lot of YOUR TIME to make it work...

If it still does not - THEN post code and explain what you tried,etc.

And do not feel angry if people do not feel like helping you solve YOUR problems /spoonfeeding you at this particular moment in their lives.

Re: Define Exit Parameters inside entry [Re: Zheka] #475992
01/16/19 17:09
01/16/19 17:09
Joined: Oct 2018
Posts: 70
AZ
C
chsmac85 Offline OP
Junior Member
chsmac85  Offline OP
Junior Member
C

Joined: Oct 2018
Posts: 70
AZ
Wow. Your arrogance knows no bounds. I don't need to be spoon feed but I can do without being talked down do because I don't understand your esoteric manuals and tutorials.

I've read this tutorial, now twice, and it provides no help. I've also purchased the book, as I've already mentioned.

My original question was, does the exit function need to be passed to the enterLong function or are those two things handled elsewhere. Explain to me where that's discussed in workshop 1 variables. It isn't!

I've seen responses that these things are handled by TMF's (again all you coders are incredibly lazy and can't even type Trade Management Function) but no examples of defining an exit is listed anywhere in the manual.

Back to my second point, you can't complain that no one participates and uses your software when you don't make it accessible. Then when people ask for help, you tell them they want to be spoon fed.

Is it unreasonable for you to say in your response "Have you read the manual?". Because I could respond just as I have here to say "Yes, I have" but I am confused on how these zorro functions interact with each other and am asking for clarification.

Congratulations on making another happy zorro user.

Re: Define Exit Parameters inside entry [Re: chsmac85] #475994
01/16/19 17:59
01/16/19 17:59
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
Welcome to the forum! laugh

Originally Posted By: chsmac85
Would it be enterLong(exitLong(price=my_exit_price))?
This syntax is completely wrong. Were you trying to make a TMF? Because you did not.

TMF documentation is here:
https://zorro-project.com/manual/en/trade.htm

The workflow for a TMF is this:
* Make a function, **exactly** in the format specified in the manual.
* Then feed a function to the enter logic.

In order to understand this concept, you also need to know function pointers:
http://manual.zorro-trader.com/function.htm

And in order to really understand, you need to put these concepts **in practice**.

Finally, your series can only be accessed from run(). So, your exit logic should be inside run. Like this:
* If a series condition is met, cycle through your trades to see which you want to kill. The way you do this depends on what your objective is.

Check out the examples in here:
http://manual.zorro-trader.com/tips.htm

Re: Define Exit Parameters inside entry [Re: AndrewAMD] #475996
01/16/19 19:42
01/16/19 19:42
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
Neither myself nor Dalla are affiliated with Zorro (and its "esoteric tutorials").

Its a public forum where users are helping users, so depending on what and how you ask you might or might not get "support".

The rest is up to you..

Re: Define Exit Parameters inside entry [Re: Zheka] #476001
01/16/19 23:30
01/16/19 23:30
Joined: Oct 2018
Posts: 70
AZ
C
chsmac85 Offline OP
Junior Member
chsmac85  Offline OP
Junior Member
C

Joined: Oct 2018
Posts: 70
AZ
Zheka, that's the best response I've heard and I want to say thank you for sticking through this with me. I'm trying to be an active member of the forum and build a community. I didn't appreciate it being assumed that I haven't done leg work, when quite frankly I am just not good at code and wanted some help.
I apologize for my verbiage and I will work on phrasing my questions more clearly with examples. On StackOverflow they have a suggested guide for how to make a post in order to receive responses. Something along those lines I think could be beneficial.

Last edited by chsmac85; 01/16/19 23:30.
Re: Define Exit Parameters inside entry [Re: AndrewAMD] #476002
01/16/19 23:34
01/16/19 23:34
Joined: Oct 2018
Posts: 70
AZ
C
chsmac85 Offline OP
Junior Member
chsmac85  Offline OP
Junior Member
C

Joined: Oct 2018
Posts: 70
AZ
Originally Posted By: AndrewAMD
Welcome to the forum! laugh

Originally Posted By: chsmac85
Would it be enterLong(exitLong(price=my_exit_price))?
This syntax is completely wrong. Were you trying to make a TMF? Because you did not.


Thank you for the detailed response.

The gist of my question was how do I match parameters. If I make a tmf that is a specific exit protocol, which is my understanding for how we'd have to handle exits that are non-standard, does it have to be located in a particular format? e.g. price=function

I'll read through what you've provided here, test out my concept and then provide a working code example so we can have a more productive conversation.

Again, thanks for your time!

Side note: Really liked your blog idea in the other thread.

Last edited by chsmac85; 01/16/19 23:35.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1