NexusFi: Find Your Edge


Home Menu

 





Coding ask and bid functions. EUR_USD


Discussion in MultiCharts

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




 
Search this Thread
  #1 (permalink)
infe2015
stockholm Sweden
 
Posts: 5 since Mar 2016
Thanks Given: 2
Thanks Received: 1

Hi
I need some help with coding ask and bid functions. EUR_USD
In normal cases the computer runs the code in every new bar
but I want just the InsideBid and InsideAsk to update in real time to
prevent orders if the spread is too big but if the spread meet the
conditions I want to send the order without waiting for the next bar.


I also wander how I delete a profit take order if close doesn’t reach
the profit take aria in time limit ex. 10sek.

Best Regards
Ingemar


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
Trump Truth Social Fires Hormuz From 10% to 59% -- Arsen …
Prediction Markets & Event Contracts
April CPI Preview: +3.7% YoY Expected at 8:30 AM ET -- C …
Traders Hideout
Khamenei Vetoes Uranium Transfer as Peace Odds Surge to …
Prediction Markets & Event Contracts
Penalties in Budapest, Peace Deadline in Tehran: Arsenal …
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

Ingemar,

your strategy will have to use IntrabarOrderGeneration for that. Then you'll have to make sure that some parts are only updated on a new bar (in case you want to keep this behavior) and the code that collects the bid/ask data either with every tick or with a timer each X seconds. A timer might be required as the bid/ask data can update without a tick coming in and otherwise you'd might miss the information.

Multicharts keeps orders alive as long as the conditions that created the order are still present. You can use this to keep orders alive for a certain duration by storing the time when you send the order and comparing that to the current time - if the difference is larger than your X seconds, the conditional check would become false and Multicharts would cancel the order.

Regards,

ABCTG


Follow me on X Reply With Quote
Thanked by:
  #3 (permalink)
infe2015
stockholm Sweden
 
Posts: 5 since Mar 2016
Thanks Given: 2
Thanks Received: 1



ABCTG View Post
Ingemar,

your strategy will have to use IntrabarOrderGeneration for that. Then you'll have to make sure that some parts are only updated on a new bar (in case you want to keep this behavior) and the code that collects the bid/ask data either with every tick or with a timer each X seconds. A timer might be required as the bid/ask data can update without a tick coming in and otherwise you'd might miss the information.

Multicharts keeps orders alive as long as the conditions that created the order are still present. You can use this to keep orders alive for a certain duration by storing the time when you send the order and comparing that to the current time - if the difference is larger than your X seconds, the conditional check would become false and Multicharts would cancel the order.

Regards,

ABCTG

Thanks for your input, I understand the second part about cansel orders.
but the firs one I still need some more info, some cod example if someone have.
Best Regards Ingemar


Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639

Ingemar,

I would suggest going through these links:

https://www.multicharts.com/trading-software/index.php/IntraBarOrderGeneration

https://www.multicharts.com/trading-software/index.php/GetAppInfo - especially the part dealing with "aiCalcReason" and the code examples

https://www.multicharts.com/trading-software/index.php/RecalcLastBarAfter

The above links contain all the information and examples you need to get you going.

Regards,

ABCTG


Follow me on X Reply With Quote
Thanked by:
  #5 (permalink)
infe2015
stockholm Sweden
 
Posts: 5 since Mar 2016
Thanks Given: 2
Thanks Received: 1


ABCTG View Post
Ingemar,


The above links contain all the information and examples you need to get you going.

Regards,

ABCTG

Perfect thank you for the help
Ingemar


Reply With Quote
Thanked by:
  #6 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639

Ingemar,

you are welcome, I am glad to hear that.

Regards,

ABCTG


Follow me on X Reply With Quote
Thanked by:




Last Updated on February 27, 2017


© 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