NexusFi: Find Your Edge


Home Menu

 





MultiCharts Easylanguage Price Decimal Points


Discussion in MultiCharts

Updated
    1. trending_up 4,189 views
    2. thumb_up 3 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
thephantom
London
 
Posts: 3 since Feb 2015
Thanks Given: 2
Thanks Received: 1

Hello
I am writing a Signal in Easylanguage for MultiCharts - to use on JPY and USD pairs. When referencing Open and Close in my easylanguage code, it is only returning prices to two decimal points. e.g. 1.54 for GBP/USD whereas the price is 1.53819. Or for EUR/JPY 135.71 when the price is 135.714.

I obviously want to use the Open and Close reserved words when placing orders - if this is only specified to two decimal points, it could be disastrous.

The code is very simple:

 
Code
Alert(Text("Price is ", Open));
Buy ("Buy") 1 Contracts Next Bar at Market;
Sell ("Buy - Hit Stop Loss") From Entry ("Buy") Next Bar at Open stop;
Please help?

Thanks.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Warsh Rate Hike at 40%, Iran June 15 Expires Tonight at …
Prediction Markets & Event Contracts
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
Kalshi Sets $4.13B All-Time Weekly Record as Polymarket …
Prediction Markets & Event Contracts
Memorandum Watch: How the 60-Day MOU Framework Makes May …
Prediction Markets & Event Contracts
Iran Forward Curve: June 30 at 56% vs June 15 at 28% -- …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
16 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
2 thanks
CME Expands 24/7 Trading to WTI Crude Oil and Gold -- We …
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

thephantom,

the signal will use whatever number of decimals are available. You only see two in the output because by default it's limited to two decimal. For the output you can easily add more decimal spaces. For your other computations this is not needed.

A numerical expression can be formatted to specify the minimum number of characters, including the decimal point, and the number of decimal places, to be used for the output:

Expression:C:E

Where: C - minimum number of characters
E - number of decimal places

This would display the text with three decimal places
 
Code
Alert(Text("Price is ", Open:0:3));
Regards,
ABCTG


thephantom View Post
Hello
I am writing a Signal in Easylanguage for MultiCharts - to use on JPY and USD pairs. When referencing Open and Close in my easylanguage code, it is only returning prices to two decimal points. e.g. 1.54 for GBP/USD whereas the price is 1.53819. Or for EUR/JPY 135.71 when the price is 135.714.

I obviously want to use the Open and Close reserved words when placing orders - if this is only specified to two decimal points, it could be disastrous.

The code is very simple:

 
Code
Alert(Text("Price is ", Open));
Buy ("Buy") 1 Contracts Next Bar at Market;
Sell ("Buy - Hit Stop Loss") From Entry ("Buy") Next Bar at Open stop;
Please help?

Thanks.


Follow me on X Reply With Quote
Thanked by:
  #3 (permalink)
thephantom
London
 
Posts: 3 since Feb 2015
Thanks Given: 2
Thanks Received: 1


ABCTG
Thanks for the reply - I was concerned the Open and Close prices displayed in the Alert would be what was sent to the broker when orders were submitted. As you've stated, this is not the case, and it's simply a matter of display/formatting for the Alert text.

Thanks for your help and confirmation on how to get the decimal places displayed in the Alert.


Reply With Quote
Thanked by:
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

thephantom,

you are welcome.

Regards,

ABCTG


Follow me on X Reply With Quote




Last Updated on February 16, 2015


© 2026 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 - Downloads - Top
no new posts