Define Exit Parameters inside entry

Posted By: chsmac85

Define Exit Parameters inside entry - 01/15/19 14:12

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)?
Posted By: Dalla

Re: Define Exit Parameters inside entry - 01/15/19 18:59

Check the tutorials in the manual
Posted By: chsmac85

Re: Define Exit Parameters inside entry - 01/16/19 02:38

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.
Posted By: Zheka

Re: Define Exit Parameters inside entry - 01/16/19 15:33

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.
Posted By: chsmac85

Re: Define Exit Parameters inside entry - 01/16/19 17:09

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.
Posted By: AndrewAMD

Re: Define Exit Parameters inside entry - 01/16/19 17:59

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
Posted By: Zheka

Re: Define Exit Parameters inside entry - 01/16/19 19:42

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..
Posted By: chsmac85

Re: Define Exit Parameters inside entry - 01/16/19 23:30

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.
Posted By: chsmac85

Re: Define Exit Parameters inside entry - 01/16/19 23:34

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.
© 2024 lite-C Forums