NexusFi: Find Your Edge


Home Menu

 





Question about writing code in Easy language


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one will4 with 29 posts (1 thanks)
    2. looks_two ABCTG with 26 posts (14 thanks)
    3. looks_3 Jura with 1 posts (1 thanks)
    4. looks_4 kevinkdog with 1 posts (1 thanks)
      Best Posters
    1. looks_one kevinkdog with 1 thanks per post
    2. looks_two Jura with 1 thanks per post
    3. looks_3 ABCTG with 0.5 thanks per post
    4. looks_4 will4 with 0 thanks per post
    1. trending_up 11,137 views
    2. thumb_up 17 thanks given
    3. group 4 followers
    1. forum 58 posts
    2. attach_file 0 attachments




 
Search this Thread

Question about writing code in Easy language

  #1 (permalink)
will4
sydney,Australila
 
Posts: 31 since Jun 2017
Thanks Given: 13
Thanks Received: 1

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?

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Futures True Range Report
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
18 thanks
The Program
18 thanks
  #2 (permalink)
 
tradingest's Avatar
 tradingest 
Milan, Italy
 
Experience: Master
Platform: NT8
Trading: Futures, Forex
Posts: 111 since Dec 2014
Thanks Given: 9
Thanks Received: 11

If you explain better I can help you

Sent from my HUAWEI VNS-L31 using NexusFi mobile app

Reply With Quote
  #3 (permalink)
will4
sydney,Australila
 
Posts: 31 since Jun 2017
Thanks Given: 13
Thanks Received: 1



tradingest View Post
If you explain better I can help you

Sent from my HUAWEI VNS-L31 using


Hello

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

Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

will4,

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.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
will4
sydney,Australila
 
Posts: 31 since Jun 2017
Thanks Given: 13
Thanks Received: 1


ABCTG View Post
will4,

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.

Regards,

ABCTG

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

Reply With Quote
  #6 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

will4,

GetAppInfo is a reserved word. You'll find examples and the options for it in the Multicharts wiki or help files.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #7 (permalink)
will4
sydney,Australila
 
Posts: 31 since Jun 2017
Thanks Given: 13
Thanks Received: 1


ABCTG View Post
will4,

GetAppInfo is a reserved word. You'll find examples and the options for it in the Multicharts wiki or help files.

Regards,

ABCTG

Hello

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;

Reply With Quote
  #8 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

will4,

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.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #9 (permalink)
will4
sydney,Australila
 
Posts: 31 since Jun 2017
Thanks Given: 13
Thanks Received: 1


ABCTG View Post
will4,

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.

Regards,

ABCTG

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)

variables:
var1 (0),
var2 (0),
atsStatus (1);

atsStatus = GetAppInfo(aiStrategyAuto);

if (atsStatus = 1) then begin

var1=lastbaronchart-200 points;
var2=LastBarOnChart+200 points;

buy 1 contract next bar at var1 limit ;
sell 1 contract next bar at var2 limit;

end;


------ Compiled with error(s): ------
Types are not compatible
line 11, column 5

Reply With Quote
  #10 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623


will4,

what does the function lastbaronchart return?

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on July 14, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts