You haven't mention SetAdvancedInterfaceOptionsButtons(self) anywhere in the code so I'm not sure where this comes into it.
Your XML creates two checkbuttons called MyFrameCheckBoxOne and MyFrameCheckBoxTwo.
Assuming you want to use this as a template and in this example MyFrameCheckBoxOne is your "parent" and you want a generic way to call ToggleMyOptions for MyFrameCheckBoxTwo every time the parent is clicked then:
Code:
<Frame name="MyFrame" hidden="true" parent="InterfaceOptionsFramePanelContainer" virtual="true">
<CheckButton name="$parentCheckBoxOne" inherits="InterfaceOptionsCheckButtonTemplate">
<Anchors>
<Anchor>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self.panel = "GROUPS_AND_RAID_FINDER"
self.name = "ParentCheckBox"
self.root = true
</OnLoad>
<OnEvent>
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
SetMyOptionsButtons(self)
</OnEvent>
<OnClick>
ToggleMyOptions(self)
ToggleMyOptions(_G[self:GetParent():GetName().."CheckBoxTwo"])
</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="$parentCheckBoxTwo" inherits="InterfaceOptionsSmallCheckButtonTemplate">
<Anchors>
<Anchor>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self.variable = "variable"
self.name = "ChildCheckBox"
self.parent = "ParentCheckBox"
</OnLoad>
<OnEvent>
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
SetMyOptionsButtons(self)
</OnEvent>
<OnClick>
ToggleMyOptions(self)
</OnClick>
</Scripts>
</CheckButton>
</Frame>
MyFrame is not a great name for a top level frame but I'm assuming it's just an example.
You can also do this all in lua and avoid creating a bunch of global functions and the headache of debugging xml.