NexusFi: Find Your Edge


Home Menu

 





Coding ask and bid functions. EUR_USD


Discussion in MultiCharts

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




 
Search this Thread

Coding ask and bid functions. EUR_USD

  #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?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
18 thanks
GFIs1 1 DAX trade per day journal
15 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

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 Twitter 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,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

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 Twitter 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,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

Ingemar,

you are welcome, I am glad to hear that.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on February 27, 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