Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hi
I want to write a simple program in Easy language that when I turn on Automated system ,it places sell short two points on top of the current market price(price when I turn on Automated system)and places buy two points below the current market price(price when I turn on Automated system) ,I appreciate if anyone can help?
Can you help answer these questions from other members on NexusFi?
On Multicharts (ESU7) the current market price is :2435.00 ,I want to write a code that when I turn on Automated system it places buy at 2433.00(two points below the current market price) and places sell at 2437.00(2points on top of current market price) and waits until one of them fills .I appreciate your assistance and I look forward in hearing from you
you will have to store the last price on the chart in a variable when the strategy automation is enabled (look into GetAppInfo to detect that) and use this to issue limit orders - make sure not to constanly update the variable after that, as this would cancel/resend your limit orders. These limit orders could be placed within a conditional statement where you check for the market position being flat.
Hello
I know how to issue limit orders with if statement ,but I can not understand first part of your answer"you will have to store the last price on the chart in a variable when the strategy automation is enabled (look into GetAppInfo to detect that)" ? What do you mean by Getappinfo? How can I get the last price from GetAppInfo?Can you explain more ?
I appreciate your assistance and I look forward in hearing from you
I read few examples but I could not see something that can help me .Is there any reserved word that I can use instead of "at market " ? For example if easy language accepts "at market +200 points" it was fine ,but it does not accept. Can you send the links to the examples that you think might be helpful.
This is the code that I have written ,when market position is 1 or -1 everything is O.K ,but when marketposition is zero(0)I do not know what to write.
I appreciate your assistance and I look forward in hearing from you.
vars:
lmt (0),
st (0);
If marketposition=0 then buy 1 contract next bar at market;
If marketposition=1 then begin
st=Entryprice -300 point ;
lmt=Entryprice+250 point;
sell 1 contract next bar at lmt limit;
sell 1 contract next bar at st stop;
end;
If marketposition=-1 then begin
st=Entryprice+300 point ;
lmt=Entryprice -250 point; buy to cover 1 contract next bar at lmt limit;
buy to cover 1 contract next bar at st stop;
end;
market orders can only be issued at market and not X points higher. It would work to save a price in a variable and in case the current price is above that price issue a market order.
I posted a working idea in #4 in this thread, you just have to turn it into code.
Hi
I write this program for the first part of my question but Easylanguage does not compile it ,would you mind if I ask you where I have made a mistake ? I appreciate your assistance and I look forward in hearing from you.(I could not find a reserve word for last price on chart so I used lastbaronchart)