NexusFi: Find Your Edge


Home Menu

 





MultiCharts Easylanguage Price Decimal Points


Discussion in MultiCharts

Updated
    1. trending_up 4,079 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?
Cboe Files for Near 24x5 Equities Trading -- December 20 …
Traders Hideout
CME Group CEO Calls CFTC-Approved Crypto Perps Dangerous …
Traders Hideout
Roland Garros Final Day: $3M on Zverev at 80.5% -- Leban …
Prediction Markets & Event Contracts
S&P 500 Holds the Line: No Fast Track for SpaceX, Op …
Stocks and ETFs
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
The Pivot Point 113.6³ — Navigating the Prediction of …
26 thanks
Sober Journey With S&P
17 thanks
The Confluence Meter: A Multi-Layered Signal Framework B …
11 thanks
NT8 color choices
10 thanks
Volume Indicators
7 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639

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,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639

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