NexusFi: Find Your Edge


Home Menu

 





MultiCharts OR Trading Systems setting


Discussion in MultiCharts

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

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:
  #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 <> 0then begin
    flagma 
1;
    
end
    
else if (marketposition  0then
    flagma 
0;

GVSetFloat(2,flagma);
flagstoGVGetFloat(1);


IF ( 
marketposition <> and CONDITION2 AND flagsto then  
    BUY 
"ccilong" 1 share NEXT BAR AT MARKET;
        
IF ( 
marketposition <> -and CONDITION3  AND flagsto 0then 
    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 <> 0then begin
    flagsto 
1;
    
end
    
else if (marketposition  0then
    flagsto 
0;
    
GVSetFloat(1,flagsto);
flagma GVGetFloat(2) ;


IF ( 
marketposition <> and CONDITION2 AND flagma then  
    BUY 
"RSILONG" 1 share NEXT BAR AT MARKET;
        
IF ( 
marketposition <> -and CONDITION3  AND flagma 0then 
    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,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639

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