NexusFi: Find Your Edge


Home Menu

 





Funtion: Filter combo?!


Discussion in MultiCharts

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




 
Search this Thread
  #1 (permalink)
maxk
Taipei, Taiwan
 
Posts: 9 since Jun 2023
Thanks Given: 2
Thanks Received: 1

Hello everyone,

I'm coding a funtion for filters combo as attached PLA, could anyone help me to correct it?

Thank you in advance for any kind of help.

Grand


Attached Files
Elite Membership required to download: FxCombo.pla
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Ceasefire in Name Only: Three Numbers That Define the Ir …
Prediction Markets & Event Contracts
The Ceasefire Curve: 2pct Peace by Next Week, 60pct by S …
Prediction Markets & Event Contracts
Iran Airspace Collapses 18 Points to 15.5% While Hormuz …
Prediction Markets & Event Contracts
Ceasefire Collapse: Iran Fires 24 Missiles, Israel Hits …
Traders Hideout
Kalshi Rockets to $22B, Passes Polymarket in Volume -- B …
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)
 
ShadowFox's Avatar
 ShadowFox 
CO/USA
 
Experience: Intermediate
Platform: TradeStation, Multicharts
Trading: Stocks, Futures
Posts: 129 since Jun 2020
Thanks Given: 70
Thanks Received: 159

Hi maxk, please post the code here if you can. More likely to get someone to look over it if they don't have to download and import.

A compile error if you are getting one would be helpful in pinpointing as well.

Sent using the NexusFi mobile app


Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
maxk
Taipei, Taiwan
 
Posts: 9 since Jun 2023
Thanks Given: 2
Thanks Received: 1


Hi ShadowFox, thank you for your response, please see the codes below:

Inputs:
Fx1(Numeric), Fx3(Numeric), Fx5(Numeric);

Vars:
Fx1_V(True), Fx3_V(True),
Fx5_V(True), FxL(0);

If Fx1 = 1 then Fx1_V =
O > H[1];
If Fx3 = 1 then Fx3_V =
O > C[1];
If Fx5 = 1 then Fx5_V =
_Volume < _Volume[1];

FxL = Fx1_V and Fx3_V and Fx5_V;

//

and the comply error is:
Types are not compatible
line 15, column 0



ShadowFox View Post
Hi maxk, please post the code here if you can. More likely to get someone to look over it if they don't have to download and import.

A compile error if you are getting one would be helpful in pinpointing as well.

Sent using the NexusFi mobile app


Reply With Quote
  #4 (permalink)
 
ShadowFox's Avatar
 ShadowFox 
CO/USA
 
Experience: Intermediate
Platform: TradeStation, Multicharts
Trading: Stocks, Futures
Posts: 129 since Jun 2020
Thanks Given: 70
Thanks Received: 159

Hi Maxk,

Your If statements are fine but they are not doing what you want them to do. I see what you are doing with the filter input switches. I would suggest cleaning up the If statement.

If Fx1 = 1 and O > H[1] then Fx1_V = true
else Fx1_V = false;

Warning, this provides a false even if O > H[1] when Fx1 = 0. Your final line to check whether all the values are true then do something. If one of the switches is off, it will make the value false and therefore never fill the final conditions.

The final error and what is causing the compile error is the FxL final output. You are establishing this as numeric but attempting to apply a bool to it.

I would suggest something like this to clean it up.

 
Code
Inputs:
Fx1(Numeric), Fx3(Numeric), Fx5(Numeric);

Vars:
Fx1_V(False), Fx3_V(False),
Fx5_V(False), FxL(False);

If (Fx1 = 1 and O > H[1]) or Fx1 = 0 then Fx1_V = true
else Fx1_V = false;
If (Fx3 = 1 and O > C[1]) or Fx1 = 0 then Fx3_V = true
else Fx3_V = false;
If (Fx5 = 1 and Volume < Volume[1]) or Fx5 = 0 then Fx5_V = true
else Fx5_V = false;

FxL = Fx1_V and Fx3_V and Fx5_V;


Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
maxk
Taipei, Taiwan
 
Posts: 9 since Jun 2023
Thanks Given: 2
Thanks Received: 1

Hi ShadoFox,

Thanks for your help, but still comply error:

"Types are not compatible"



ShadowFox View Post
Hi Maxk,

Your If statements are fine but they are not doing what you want them to do. I see what you are doing with the filter input switches. I would suggest cleaning up the If statement.

If Fx1 = 1 and O > H[1] then Fx1_V = true
else Fx1_V = false;

Warning, this provides a false even if O > H[1] when Fx1 = 0. Your final line to check whether all the values are true then do something. If one of the switches is off, it will make the value false and therefore never fill the final conditions.

The final error and what is causing the compile error is the FxL final output. You are establishing this as numeric but attempting to apply a bool to it.

I would suggest something like this to clean it up.

 
Code
Inputs:
Fx1(Numeric), Fx3(Numeric), Fx5(Numeric);

Vars:
Fx1_V(False), Fx3_V(False),
Fx5_V(False), FxL(False);

If (Fx1 = 1 and O > H[1]) or Fx1 = 0 then Fx1_V = true
else Fx1_V = false;
If (Fx3 = 1 and O > C[1]) or Fx1 = 0 then Fx3_V = true
else Fx3_V = false;
If (Fx5 = 1 and Volume < Volume[1]) or Fx5 = 0 then Fx5_V = true
else Fx5_V = false;

FxL = Fx1_V and Fx3_V and Fx5_V;


Reply With Quote
  #6 (permalink)
alan tsai
Taipei ,Taiwan
 
Posts: 3 since Apr 2021
Thanks Given: 44
Thanks Received: 0

FxL = Fx1_V change Fx1 = Fx1_V


Reply With Quote




Last Updated on March 10, 2024


© 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