NexusFi: Find Your Edge


Home Menu

 





MultiCharts OR Trading Systems setting


Discussion in MultiCharts

Updated
    1. trending_up 11,202 views
    2. thumb_up 6 thanks given
    3. group 3 followers
    1. forum 23 posts
    2. attach_file 2 attachments




 
Search this Thread
  #21 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,643

I am glad to hear this.
Global Variables will only work in realtime, which is a bit of a limitation. From looking over your code it looks okay to me and if it works on your end, it seems to be fine.

Regards,
ABCTG


Follow me on X Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
My Rant with AMP Futures
Trading Reviews and Vendors
Datafeed for Atas
Platforms and Indicators
No book, only a stair: journaling fills where price move …
Cryptocurrency
Trump Media to sell instant access to market-moving soci …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
BERN ALGOS algo trading journal
3 thanks
NexusFi site changelog and issues/problem reporting
2 thanks
TopStep Trader disappointment
2 thanks
Want your NinjaTrader indicator created, free?
1 thanks
Running trading strategies on a VPS
1 thanks
  #22 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4

Nah it doesn t work very well damn.... i've a problem too when i've double signal at the same bar.

I ve to find another way...


Reply With Quote
  #23 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4


Ok i'am near to the solution....

this seems works correctly:

CODE 1

 
Code
                            
var: flagma(1),flagsto(1);

condition2 = cci(14) > 50;
condition3 = cci(14) < -50;

    IF ( 
marketposition <> 0) then begin
    flagma 
= 1;
    
end
    
else if (marketposition  = 0) then
    flagma 
= 0;

GVSetFloat(2,flagma);
flagsto= GVGetFloat(1);


IF ( 
marketposition <> 1 and CONDITION2 AND flagsto = 0 ) then  
    BUY 
( "ccilong" ) 1 share NEXT BAR AT MARKET;
        
IF ( 
marketposition <> -1 and CONDITION3  AND flagsto = 0) then 
    SELLSHORT 
( "ccishort" )  1 share NEXT BAR AT MARKET; 
CODE2

 
Code
                            
var: flagma(1),flagsto(1);

condition2 = rsi(c,14) < 40;
condition3 = rsi(c,14) > 60;

    IF ( 
marketposition <> 0) then begin
    flagsto 
= 1;
    
end
    
else if (marketposition  = 0) then
    flagsto 
= 0;
    
GVSetFloat(1,flagsto);
flagma = GVGetFloat(2) ;


IF ( 
marketposition <> 1 and CONDITION2 AND flagma = 0 ) then  
    BUY 
( "RSILONG" ) 1 share NEXT BAR AT MARKET;
        
IF ( 
marketposition <> -1 and CONDITION3  AND flagma = 0) then 
    SELLSHORT 
( "RSISHORT" )  1 share NEXT BAR AT MARKET; 
I only moved if functions over all....

But there s still a little problem, when i have two signals at they same time, variables are both 0 and both systems go on market...

Any idea to solve this, maybe last, problem ?
Maybe giving a delay to 1 code ? (but is not so good like solution.....)

Thx to any answer


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

That could indeed be a problem. First of all I'd check how often this happens.

In case this is a problem, what might work is evaluating if a system wants to enter at the end of the bar and then manages/allows the entries within the next couple of ticks of the new bar. However this will require intrabar order generation.


Follow me on X Reply With Quote




Last Updated on June 6, 2013


© 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